2020-11-01 11:23:11 +01:00
|
|
|
name: Publish release
|
|
|
|
|
|
|
|
on:
|
|
|
|
push:
|
|
|
|
tags:
|
|
|
|
- 'v*'
|
|
|
|
|
|
|
|
jobs:
|
|
|
|
build:
|
2022-08-01 17:13:34 +02:00
|
|
|
runs-on: ubuntu-22.04
|
2021-02-13 13:29:38 +01:00
|
|
|
strategy:
|
|
|
|
matrix:
|
2023-11-04 13:15:15 +01:00
|
|
|
php-version: ['8.2', '8.3']
|
2021-02-13 13:29:38 +01:00
|
|
|
swoole: ['yes', 'no']
|
2020-11-01 11:23:11 +01:00
|
|
|
steps:
|
2023-11-04 12:42:31 +01:00
|
|
|
- uses: actions/checkout@v4
|
2022-08-13 11:56:46 +02:00
|
|
|
- uses: './.github/actions/ci-setup'
|
2022-08-13 10:11:41 +02:00
|
|
|
with:
|
|
|
|
php-version: ${{ matrix.php-version }}
|
2023-11-08 18:51:03 +01:00
|
|
|
php-extensions: openswoole-22.1.0
|
2022-08-13 11:56:46 +02:00
|
|
|
extensions-cache-key: publish-swagger-spec-extensions-${{ matrix.php-version }}
|
|
|
|
install-deps: 'no'
|
2021-02-13 13:29:38 +01:00
|
|
|
- if: ${{ matrix.swoole == 'yes' }}
|
2020-11-01 11:23:11 +01:00
|
|
|
run: ./build.sh ${GITHUB_REF#refs/tags/v}
|
2021-02-13 13:29:38 +01:00
|
|
|
- if: ${{ matrix.swoole == 'no' }}
|
|
|
|
run: ./build.sh ${GITHUB_REF#refs/tags/v} --no-swoole
|
2023-12-19 11:13:13 +01:00
|
|
|
- uses: actions/upload-artifact@v4
|
2021-02-13 13:29:38 +01:00
|
|
|
with:
|
2021-02-13 14:12:38 +01:00
|
|
|
name: dist-files-${{ matrix.php-version }}-${{ matrix.swoole }}
|
2021-02-13 13:29:38 +01:00
|
|
|
path: build
|
|
|
|
|
|
|
|
publish:
|
|
|
|
needs: ['build']
|
2022-08-01 17:13:34 +02:00
|
|
|
runs-on: ubuntu-22.04
|
2021-02-13 13:29:38 +01:00
|
|
|
steps:
|
2023-11-04 12:42:31 +01:00
|
|
|
- uses: actions/checkout@v4
|
2023-12-19 11:13:13 +01:00
|
|
|
- uses: actions/download-artifact@v4
|
2021-02-13 13:29:38 +01:00
|
|
|
with:
|
|
|
|
path: build
|
2020-11-01 11:23:11 +01: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 14:33:36 +01:00
|
|
|
build/*/shlink*_dist.zip
|
2021-02-13 13:29:38 +01:00
|
|
|
|
|
|
|
delete-artifacts:
|
|
|
|
needs: ['publish']
|
2022-08-01 17:13:34 +02:00
|
|
|
runs-on: ubuntu-22.04
|
2021-02-13 13:29:38 +01:00
|
|
|
steps:
|
2023-04-12 19:13:35 +02:00
|
|
|
- uses: geekyeggo/delete-artifact@v2
|
2021-02-13 13:29:38 +01:00
|
|
|
with:
|
2023-04-12 19:13:35 +02:00
|
|
|
name: dist-files-*
|