Skip to content

Commit 6d218f2

Browse files
authored
Merge pull request #137 from NearNodeFlash/add-release-action
Auto-release when a tag is pushed
2 parents fe86b8f + 4685ed6 commit 6d218f2

2 files changed

Lines changed: 23 additions & 4 deletions

File tree

.github/workflows/publish-main.yaml

Lines changed: 22 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,6 @@
11
name: Publish `main` Documentation
2-
on:
3-
push:
4-
branches:
5-
- main
2+
3+
on: [push]
64

75
jobs:
86
build:
@@ -34,3 +32,23 @@ jobs:
3432
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
3533
run: |
3634
mike deploy --push dev
35+
36+
create_release:
37+
needs: build
38+
if: startsWith(github.ref, 'refs/tags/v')
39+
runs-on: ubuntu-latest
40+
steps:
41+
- name: Checkout
42+
uses: actions/checkout@v4
43+
with:
44+
fetch-tags: true
45+
fetch-depth: 0
46+
- name: Repair tag
47+
run: git fetch -f origin ${{ github.ref }}:${{ github.ref }}
48+
- name: Verify that the tag is annotated
49+
run: if test x$(git for-each-ref ${{ github.ref }} | awk '{print $2}') = xtag; then /bin/true; else echo "\"${{ github.ref }}\" does not look like an annotated tag!"; /bin/false; fi
50+
- name: Release
51+
uses: softprops/action-gh-release@v1
52+
with:
53+
#prerelease: true
54+
generate_release_notes: true

docs/repo-guides/release-nnf-sw/readme.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -183,6 +183,7 @@ that everything is current on `master` for `nnf-deploy`.
183183

184184
12. Follow steps 6-7 from the previous section to finalize the release of `nnf-deploy`.
185185

186+
**Please review documenation for changes you may have made**
186187
**The software is now released!**
187188

188189
## Clone a release

0 commit comments

Comments
 (0)