We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 9ea0c8d commit a660aaaCopy full SHA for a660aaa
1 file changed
.github/workflows/release.yml
@@ -0,0 +1,34 @@
1
+name: release
2
+
3
+on:
4
+ workflow_dispatch:
5
+ inputs:
6
+ version:
7
+ description: Semantic version tag such as v1.0.0
8
+ required: true
9
10
+permissions:
11
+ contents: write
12
13
+jobs:
14
+ release:
15
+ runs-on: ubuntu-latest
16
+ environment: release
17
+ steps:
18
+ - uses: actions/checkout@v4
19
+ - name: Validate version
20
+ run: |
21
+ python - <<'PY'
22
+ import os, re
23
+ version = os.environ['VERSION']
24
+ if not re.fullmatch(r'v[0-9]+\.[0-9]+\.[0-9]+(-[0-9A-Za-z.-]+)?', version):
25
+ raise SystemExit('Invalid version: ' + version)
26
+ print(version)
27
+ PY
28
+ env:
29
+ VERSION: ${{ inputs.version }}
30
+ - name: Create release
31
32
+ GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
33
34
+ run: gh release create "$VERSION" --title "$VERSION" --generate-notes
0 commit comments