From 10c7d89e58eb8689fc7839eab13c4dc052730baa Mon Sep 17 00:00:00 2001 From: Chris Kankiewicz Date: Fri, 5 Mar 2021 23:11:32 -0700 Subject: [PATCH] Build artifacts and create a release on tagged commits --- .github/workflows/test-suite.yaml | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) diff --git a/.github/workflows/test-suite.yaml b/.github/workflows/test-suite.yaml index 223149b..e665b00 100644 --- a/.github/workflows/test-suite.yaml +++ b/.github/workflows/test-suite.yaml @@ -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