mirror of
https://github.com/DirectoryLister/DirectoryLister.git
synced 2025-08-22 13:43:15 +02:00
Build artifacts and create a release on tagged commits
This commit is contained in:
28
.github/workflows/test-suite.yaml
vendored
28
.github/workflows/test-suite.yaml
vendored
@@ -96,3 +96,31 @@ jobs:
|
||||
|
||||
- name: Run Tests
|
||||
run: app/vendor/bin/phpunit --coverage-text
|
||||
|
||||
release:
|
||||
name: Create Release
|
||||
runs-on: 'ubuntu-latest'
|
||||
if: startsWith(github.ref, 'refs/tags/')
|
||||
needs: tests
|
||||
env:
|
||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
|
||||
steps:
|
||||
- name: Checkout Repository
|
||||
uses: actions/checkout@v2
|
||||
|
||||
- name: Get Tag
|
||||
id: vars
|
||||
run: echo ::set-output name=tag::${GITHUB_REF#refs/*/}
|
||||
|
||||
- name: Build Artifact
|
||||
run: make artifacts
|
||||
|
||||
- name: Publish Release
|
||||
uses: softprops/action-gh-release@v1
|
||||
with:
|
||||
name: v${{ steps.vars.outputs.tag }}
|
||||
draft: true
|
||||
files: |
|
||||
artifacts/DirectoryLister-${{ steps.vars.outputs.tag }}.tar.gz
|
||||
artifacts/DirectoryLister-${{ steps.vars.outputs.tag }}.zip
|
||||
|
Reference in New Issue
Block a user