diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 81eda8e..2548aa8 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -41,3 +41,26 @@ jobs: with: name: BuildArtifact path: ./bin/website-cookie-analyzer* + release: + strategy: + matrix: + os: [ubuntu-latest] + runs-on: ${{ matrix.os }} + needs: build + if: startsWith(github.ref, 'refs/tags/') + steps: + - name: Checkout code + uses: actions/checkout@v2 + - name: Download Build artifacts + uses: actions/download-artifact@v2 + with: + name: BuildArtifact + path: ./bin/ + - name: Release + uses: softprops/action-gh-release@v1 + with: + draft: false + prerelease: false + files: ./bin/* + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml deleted file mode 100644 index ad35532..0000000 --- a/.github/workflows/release.yml +++ /dev/null @@ -1,26 +0,0 @@ -name: Release job -on: - push: - tags: - - 'v*' -jobs: - release: - strategy: - matrix: - os: [ubuntu-latest] - runs-on: ${{ matrix.os }} - steps: - - name: Download Build artifacts - uses: actions/download-artifact@v2 - with: - name: BuildArtifact - - name: Create Release - id: create_release - uses: actions/create-release@v1 - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - with: - tag_name: ${{ github.ref }} - release_name: Release ${{ github.ref }} - draft: false - prerelease: false