diff options
author | Sven-Hendrik Haase <svenstaro@gmail.com> | 2021-08-29 02:48:09 +0000 |
---|---|---|
committer | Sven-Hendrik Haase <svenstaro@gmail.com> | 2021-08-29 02:48:09 +0000 |
commit | 1653157ed2df7852ae588a5771ca27250378547d (patch) | |
tree | 06c31ba8c412331948af50d574a5d5c309022dfd /.github/workflows | |
parent | Run CI on push only (diff) | |
download | miniserve-1653157ed2df7852ae588a5771ca27250378547d.tar.gz miniserve-1653157ed2df7852ae588a5771ca27250378547d.zip |
Always build all binaries for all targets
This uses the original workflow we used for publishing the binaries but now we
use it as CI as well with an optional publish in case we are in a tag push.
Diffstat (limited to '.github/workflows')
-rw-r--r-- | .github/workflows/build-release-binaries.yml (renamed from .github/workflows/publish.yml) | 18 |
1 files changed, 11 insertions, 7 deletions
diff --git a/.github/workflows/publish.yml b/.github/workflows/build-release-binaries.yml index 064a0a0..5085246 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/build-release-binaries.yml @@ -1,12 +1,9 @@ -name: Publish +name: Build release binaries (and publish them if this is a tag) -on: - push: - tags: - - 'v*' +on: push jobs: - publish: + binaries: name: ${{ matrix.os }} for ${{ matrix.target }} runs-on: ${{ matrix.os }} strategy: @@ -147,11 +144,16 @@ jobs: strip: ${{ matrix.strip }} if: ${{ matrix.compress }} + ### + # Below this line, steps will only be ran if a tag was pushed. + ### + - name: Get tag name id: tag_name run: | echo ::set-output name=current_version::${GITHUB_REF#refs/tags/v} shell: bash + if: startsWith('refs/tags/v', github.ref) - name: Get CHANGELOG.md entry id: changelog_reader @@ -159,8 +161,9 @@ jobs: with: version: ${{ steps.tag_name.outputs.current_version }} path: ./CHANGELOG.md + if: startsWith('refs/tags/v', github.ref) - - name: Release + - name: Publish uses: svenstaro/upload-release-action@v2 with: repo_token: ${{ secrets.GITHUB_TOKEN }} @@ -168,3 +171,4 @@ jobs: tag: ${{ github.ref }} asset_name: miniserve-$tag-${{ matrix.release_name }} body: ${{ steps.changelog_reader.outputs.log_entry }} + if: startsWith('refs/tags/v', github.ref) |