shlink/.github/workflows/publish-release.yml

60 lines
1.6 KiB
YAML
Raw Normal View History

name: Publish release
on:
push:
tags:
- 'v*'
jobs:
build:
2022-08-01 10:13:34 -05:00
runs-on: ubuntu-22.04
strategy:
matrix:
2022-04-23 05:08:01 -05:00
php-version: ['8.1']
swoole: ['yes', 'no']
steps:
- uses: actions/checkout@v3
- uses: './.github/actions/ci-setup'
with:
php-version: ${{ matrix.php-version }}
2022-10-03 13:00:31 -05:00
php-extensions: openswoole-4.12.0
extensions-cache-key: publish-swagger-spec-extensions-${{ matrix.php-version }}
install-deps: 'no'
- if: ${{ matrix.swoole == 'yes' }}
run: ./build.sh ${GITHUB_REF#refs/tags/v}
- if: ${{ matrix.swoole == 'no' }}
run: ./build.sh ${GITHUB_REF#refs/tags/v} --no-swoole
- uses: actions/upload-artifact@v3
with:
name: dist-files-${{ matrix.php-version }}-${{ matrix.swoole }}
path: build
publish:
needs: ['build']
2022-08-01 10:13:34 -05:00
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v3
- uses: actions/download-artifact@v3
with:
path: build
- name: Publish release with assets
uses: docker://antonyurchenko/git-release:latest
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
ALLOW_EMPTY_CHANGELOG: "true"
with:
args: |
build/*/shlink*_dist.zip
delete-artifacts:
needs: ['publish']
2022-08-01 10:13:34 -05:00
runs-on: ubuntu-22.04
strategy:
matrix:
2022-04-23 05:08:01 -05:00
php-version: ['8.1']
swoole: ['yes', 'no']
steps:
- uses: geekyeggo/delete-artifact@v1
with:
name: dist-files-${{ matrix.php-version }}-${{ matrix.swoole }}