2020-11-01 13:23:11 +03:00
|
|
|
name: Publish release
|
|
|
|
|
|
|
|
on:
|
|
|
|
push:
|
|
|
|
tags:
|
|
|
|
- 'v*'
|
|
|
|
|
|
|
|
jobs:
|
|
|
|
build:
|
2021-02-13 15:29:38 +03:00
|
|
|
runs-on: ubuntu-20.04
|
|
|
|
strategy:
|
|
|
|
matrix:
|
2021-12-12 19:38:50 +03:00
|
|
|
php-version: ['8.0', '8.1']
|
2021-02-13 15:29:38 +03:00
|
|
|
swoole: ['yes', 'no']
|
2020-11-01 13:23:11 +03:00
|
|
|
steps:
|
|
|
|
- name: Checkout code
|
|
|
|
uses: actions/checkout@v2
|
2021-02-13 15:29:38 +03:00
|
|
|
- name: Use PHP
|
2020-11-01 13:23:11 +03:00
|
|
|
uses: shivammathur/setup-php@v2
|
|
|
|
with:
|
2021-02-13 15:29:38 +03:00
|
|
|
php-version: ${{ matrix.php-version }}
|
2020-11-01 13:23:11 +03:00
|
|
|
tools: composer
|
2021-12-05 12:08:10 +03:00
|
|
|
extensions: openswoole-4.8.1
|
2021-02-13 15:29:38 +03:00
|
|
|
- if: ${{ matrix.swoole == 'yes' }}
|
2020-11-01 13:23:11 +03:00
|
|
|
run: ./build.sh ${GITHUB_REF#refs/tags/v}
|
2021-02-13 15:29:38 +03:00
|
|
|
- if: ${{ matrix.swoole == 'no' }}
|
|
|
|
run: ./build.sh ${GITHUB_REF#refs/tags/v} --no-swoole
|
|
|
|
- uses: actions/upload-artifact@v2
|
|
|
|
with:
|
2021-02-13 16:12:38 +03:00
|
|
|
name: dist-files-${{ matrix.php-version }}-${{ matrix.swoole }}
|
2021-02-13 15:29:38 +03:00
|
|
|
path: build
|
|
|
|
|
|
|
|
publish:
|
|
|
|
needs: ['build']
|
|
|
|
runs-on: ubuntu-20.04
|
|
|
|
steps:
|
2021-02-13 16:18:49 +03:00
|
|
|
- name: Checkout code
|
|
|
|
uses: actions/checkout@v2
|
2021-02-13 15:29:38 +03:00
|
|
|
- uses: actions/download-artifact@v2
|
|
|
|
with:
|
|
|
|
path: build
|
2020-11-01 13:23:11 +03:00
|
|
|
- name: Publish release with assets
|
|
|
|
uses: docker://antonyurchenko/git-release:latest
|
|
|
|
env:
|
|
|
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
|
|
|
ALLOW_EMPTY_CHANGELOG: "true"
|
|
|
|
with:
|
|
|
|
args: |
|
2021-02-13 16:33:36 +03:00
|
|
|
build/*/shlink*_dist.zip
|
2021-02-13 15:29:38 +03:00
|
|
|
|
|
|
|
delete-artifacts:
|
|
|
|
needs: ['publish']
|
|
|
|
runs-on: ubuntu-20.04
|
2021-02-13 16:12:38 +03:00
|
|
|
strategy:
|
|
|
|
matrix:
|
2021-12-12 19:45:56 +03:00
|
|
|
php-version: [ '8.0', '8.1' ]
|
2021-02-13 16:12:38 +03:00
|
|
|
swoole: [ 'yes', 'no' ]
|
2021-02-13 15:29:38 +03:00
|
|
|
steps:
|
|
|
|
- uses: geekyeggo/delete-artifact@v1
|
|
|
|
with:
|
2021-02-13 16:12:38 +03:00
|
|
|
name: dist-files-${{ matrix.php-version }}-${{ matrix.swoole }}
|