-
Notifications
You must be signed in to change notification settings - Fork 26
40 lines (38 loc) · 1.78 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
on:
release:
types: created
name: Build .phar on release
jobs:
build_phar:
runs-on: ubuntu-22.04
steps:
- name: Configure PHP version
uses: shivammathur/setup-php@v2
with:
php-version: 8.1
tools: composer:v2
- uses: actions/checkout@v4
- name: Install PHIVE
run: |
wget --quiet -O phive.phar https://phar.io/releases/phive.phar
# Remove verification; key servers are unreliable and fail tests
#wget --quiet -O phive.phar.asc https://phar.io/releases/phive.phar.asc
#gpg --keyserver pool.sks-keyservers.net --recv-keys 0x9D8A98B29B2D5D79
#gpg --verify phive.phar.asc phive.phar
chmod +x phive.phar
sudo mv phive.phar /usr/local/bin/phive
- run: |
composer install --no-interaction --no-scripts --no-progress
composer show
- run: phive --no-progress install --trust-gpg-keys 4AA394086372C20A,E82B2FB314E9906E --force-accept-unsigned
- run: tools/box build --verbose --no-ansi
- name: Fetch tag name from GITHUB_REF
id: get_version
run: echo ::set-output name=VERSION::$(echo $GITHUB_REF | cut -d / -f 3)
- name: Attach .phar to release
uses: svenstaro/upload-release-action@14569a2d348419d066e34e5dfa65071ecd30b64b
with:
repo_token: ${{ secrets.GITHUB_TOKEN }}
file: slimdump.phar
asset_name: slimdump-${{ steps.get_version.outputs.VERSION }}.phar
tag: ${{ github.ref }}