forked from zephir-lang/zephir
-
Notifications
You must be signed in to change notification settings - Fork 1
80 lines (66 loc) · 2.39 KB
/
release.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
name: Upload Release Asset
on:
push:
tags:
- '*'
jobs:
build:
runs-on: ubuntu-18.04
steps:
- name: Setup Environment Variables
run: echo "BOX_VERSION=3.10.0" >> $GITHUB_ENV
- name: Checkout Code
uses: actions/checkout@v2
with:
fetch-depth: 5
- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: '7.4'
extensions: intl, zip, zlib
coverage: none
ini-values: memory_limit=1G, phar.readonly=0
- name: Get Composer Cache Directory
id: composer-cache
run: echo ::set-output name=dir::$(composer config cache-files-dir)
- name: Setup Composer Cache
uses: actions/cache@v2
with:
path: ${{ steps.composer-cache.outputs.dir }}
key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.json') }}
restore-keys: |
${{ runner.os }}-composer-
- name: Setup GitHub Token
run: |
# To increase the GitHub rate limit we're use GitHub authentication
if [ ! -z '${{ secrets.COMPOSER_TOKEN }}' ]; then
composer config github-oauth.github.com ${{ secrets.COMPOSER_TOKEN }}
fi
- name: Install Project Dependencies
run: composer install --prefer-dist --no-interaction --no-ansi --no-progress --no-suggest
- name: Install Box
run: |
wget \
"https://github.com/humbug/box/releases/download/${BOX_VERSION}/box.phar" \
--quiet \
-O ./box
chmod +x ./box
sudo mv ./box /usr/local/bin
- name: Build Zephir PHAR
run: .ci/build-phar.sh
- name: Geting Tag Name
id: get-version
run: echo ::set-output name=VERSION::${GITHUB_REF#refs/tags/}
- name: Create Release
uses: ncipollo/release-action@v1
with:
# This token is provided by GitHub Actions.
# You DO NOT need to create your own token.
token: ${{ secrets.GITHUB_TOKEN }}
name: ${{ steps.get-version.outputs.version }}
tag: ${{ steps.get-version.outputs.version }}
body: 'All notable changes to this version has been documented in the CHANGELOG.md file.'
# This will update existing tags if any
allowUpdates: true
artifacts: zephir.phar
artifactContentType: application/x-php