-
-
Notifications
You must be signed in to change notification settings - Fork 467
81 lines (66 loc) · 2.12 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
81
name: Upload Release Assets
on:
push:
tags:
- '*'
jobs:
release:
name: Create Release
runs-on: ubuntu-latest
env:
BOX_VERSION: 4.2.0
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 5
- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: '8.2'
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@v3
with:
path: ${{ steps.composer-cache.outputs.dir }}
key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.lock') }}
restore-keys: |
${{ runner.os }}-composer-
- name: Install Project Dependencies
run: composer install --prefer-dist --no-interaction --no-ansi --no-progress
- name: Install Box
run: |
wget \
"https://github.com/humbug/box/releases/download/${{ env.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: Upload Zephir Phar
uses: actions/upload-artifact@v4
with:
name: zephir.phar
path: zephir.phar
- name: Get the release version
id: get-version
run: |
echo ::set-output name=version::${GITHUB_REF#refs/tags/}
- name: Prepare Release Notes
run: |
./.ci/release-notes.sh ./CHANGELOG.md > ./release-notes.md
- name: Create Release
uses: ncipollo/release-action@v1
with:
token: ${{ secrets.GITHUB_TOKEN }}
name: ${{ steps.get-version.outputs.version }}
tag: ${{ steps.get-version.outputs.version }}
bodyFile: "./release-notes.md"
allowUpdates: true
artifacts: zephir.phar
artifactContentType: application/x-php