Skip to content

Commit 104fe7c

Browse files
Merge pull request quarkiverse#20 from holly-cummins/fix-release-build
Manually read and set tag instead of relying on a pushed ref
2 parents ccc7a54 + 3a1ea81 commit 104fe7c

File tree

1 file changed

+7
-4
lines changed

1 file changed

+7
-4
lines changed

.github/workflows/build.yml

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -50,22 +50,25 @@ jobs:
5050
retention-days: 3
5151

5252
- name: Bump version and push tag
53-
uses: anothrNick/[email protected] # Don't use @master or @v1 unless you're happy to test the latest version
53+
id: tag
54+
uses: anothrNick/[email protected]
5455
# Only try and deploy on merged code
5556
if: "github.repository == 'quarkiverse/antora-ui-quarkiverse' && github.ref_name == 'main' && (github.event_name == 'push' || github.event_name == 'schedule')"
5657
env:
57-
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # if you don't want to set write permissions use a PAT token
58+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
5859
WITH_V: true
5960

6061
- name: Publish bundle
6162
uses: ncipollo/release-action@v1
62-
# Only try and deploy on merged code
63-
if: "github.repository == 'quarkiverse/antora-ui-quarkiverse' && github.ref_name == 'main' && (github.event_name == 'push' || github.event_name == 'schedule')"
63+
# Only try and deploy on merged code, ie if we just made a tag
64+
if: "steps.tag.outputs.new_tag"
6465
with:
6566
artifacts: "./build/ui-bundle.zip"
6667
omitBody: true
6768
allowUpdates: true
6869
generateReleaseNotes: false
6970
makeLatest: true
71+
tag: "${{ steps.tag.outputs.new_tag }}"
7072
name: "HEAD"
7173
replacesArtifacts: true
74+

0 commit comments

Comments
 (0)