mirror of
https://github.com/shlinkio/shlink.git
synced 2024-12-22 12:44:57 +03:00
61 lines
1.5 KiB
YAML
61 lines
1.5 KiB
YAML
name: Publish release
|
|
|
|
on:
|
|
push:
|
|
tags:
|
|
- 'v*'
|
|
|
|
jobs:
|
|
build:
|
|
runs-on: ubuntu-20.04
|
|
strategy:
|
|
matrix:
|
|
php-version: ['8.0']
|
|
swoole: ['yes', 'no']
|
|
steps:
|
|
- name: Checkout code
|
|
uses: actions/checkout@v2
|
|
- name: Use PHP
|
|
uses: shivammathur/setup-php@v2
|
|
with:
|
|
php-version: ${{ matrix.php-version }}
|
|
tools: composer
|
|
extensions: swoole-4.6.7
|
|
- 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@v2
|
|
with:
|
|
name: dist-files-${{ matrix.php-version }}-${{ matrix.swoole }}
|
|
path: build
|
|
|
|
publish:
|
|
needs: ['build']
|
|
runs-on: ubuntu-20.04
|
|
steps:
|
|
- name: Checkout code
|
|
uses: actions/checkout@v2
|
|
- uses: actions/download-artifact@v2
|
|
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']
|
|
runs-on: ubuntu-20.04
|
|
strategy:
|
|
matrix:
|
|
php-version: [ '8.0' ]
|
|
swoole: [ 'yes', 'no' ]
|
|
steps:
|
|
- uses: geekyeggo/delete-artifact@v1
|
|
with:
|
|
name: dist-files-${{ matrix.php-version }}-${{ matrix.swoole }}
|