Skip to content

Commit c73da98

Browse files
committed
Move to draft release
1 parent 639c715 commit c73da98

1 file changed

Lines changed: 17 additions & 21 deletions

File tree

.github/workflows/release.yaml

Lines changed: 17 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -1,43 +1,39 @@
11
---
22
name: "Release"
3-
# Careful! This pushes a git tag to GitHub! The release itself is private.
3+
# Creates a draft release. No git tag is pushed; GitHub creates the tag
4+
# only once the draft release is published.
45
on:
56
workflow_dispatch:
67
inputs:
78
tag:
89
description: >
9-
Tag, which is set by the this GitHub workflow.
10+
Tag, which the release is associated with. The tag is only
11+
created once the draft release is published.
1012
Should follow SemVer and is not allowed to exist already.
1113
required: true
1214
type: string
1315

1416
jobs:
1517
release:
1618
runs-on: ubuntu-latest
19+
permissions:
20+
contents: write
1721
steps:
1822
- uses: actions/checkout@v4 # Determines the ref, which is used for the
1923
# release. For setting a different ref, all `needs` jobs need to be
2024
# adjusted. Currently, everything uses the default branch.
2125

2226
- run: ls -lh
2327

24-
- name: "Push release tag"
25-
# This is publicly visible and needs to be manually fixed if any
26-
# consecutive step fails.
28+
- name: "Create draft release"
29+
# Fails, if a release for the tag already exists.
30+
env:
31+
GH_TOKEN: ${{ github.token }}
2732
run: |
28-
git tag ${{ inputs.tag }} # Fails, if tag exists.
29-
git push origin ${{ inputs.tag }}
30-
31-
- uses: ncipollo/release-action@v1.13.0
32-
with:
33-
allowUpdates: false
34-
artifacts: "executables.zip,assets/robotmk_core-1.0.0.mkp"
35-
replacesArtifacts: true
36-
removeArtifacts: true
37-
prerelease: true
38-
draft: true
39-
body: ""
40-
artifactErrorsFailBuild: true
41-
updateOnlyUnreleased: true
42-
makeLatest: false
43-
tag: ${{ inputs.tag }}
33+
gh release create ${{ inputs.tag }} \
34+
--draft \
35+
--prerelease \
36+
--notes "" \
37+
--target ${{ github.sha }} \
38+
executables.zip \
39+
assets/robotmk_core-1.0.0.mkp

0 commit comments

Comments
 (0)