aboutsummaryrefslogtreecommitdiffstats
path: root/.github
diff options
context:
space:
mode:
Diffstat (limited to '.github')
-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)