forked from coenjacobs/mozart
-
Notifications
You must be signed in to change notification settings - Fork 25
62 lines (53 loc) · 1.66 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
name: Build, tag and attach releases
on:
release:
types: [published]
jobs:
create-phar:
runs-on: ubuntu-latest
name: Create Strauss phar on new release
steps:
- name: Git checkout
uses: actions/checkout@v2
with:
ref: master
- name: Install PHP
uses: shivammathur/setup-php@v2
with:
php-version: 7.4
- name: Install dependencies
run: composer install --no-dev --prefer-dist --no-suggest --no-progress
- name: Create .phar
run: |
wget -O phar-composer.phar https://github.com/clue/phar-composer/releases/download/v1.4.0/phar-composer-1.4.0.phar
mkdir build
mv vendor build/vendor
mv src build/src
mv bin build/bin
mv composer.json build
php -d phar.readonly=off phar-composer.phar build ./build/
- name: Test run strauss
run: php strauss.phar --version
- name: Import GPG key
uses: crazy-max/ghaction-import-gpg@v5
with:
gpg_private_key: ${{ secrets.GPG_PRIVATE_KEY }}
passphrase: ${{ secrets.PASSPHRASE }}
- name: Sign the PHAR
run: |
ls strauss.phar
gpg --local-user [email protected] \
--batch \
--yes \
--passphrase="${{ secrets.PASSPHRASE }}" \
--detach-sign \
--output strauss.phar.asc \
strauss.phar
- uses: meeDamian/[email protected]
with:
token: ${{ secrets.GITHUB_TOKEN }}
files: |
strauss.phar
strauss.phar.asc
gzip: false
allow_override: true