Skip to content

Commit af4e140

Browse files
committed
ci: add automatic release asset upload on tags
1 parent f0871d5 commit af4e140

File tree

1 file changed

+21
-0
lines changed

1 file changed

+21
-0
lines changed

.github/workflows/build.yml

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ name: Build
33
on:
44
push:
55
branches: [ main ]
6+
tags: [ 'v*' ]
67
pull_request:
78
branches: [ main ]
89

@@ -56,3 +57,23 @@ jobs:
5657
path: |
5758
${{ github.workspace }}/artifacts/*.uf2
5859
${{ github.workspace }}/artifacts/*.hex
60+
61+
release:
62+
needs: build
63+
runs-on: ubuntu-latest
64+
if: startsWith(github.ref, 'refs/tags/v')
65+
permissions:
66+
contents: write
67+
steps:
68+
- name: Download firmware artifacts
69+
uses: actions/download-artifact@v4
70+
with:
71+
name: firmware
72+
path: artifacts
73+
74+
- name: Upload release assets
75+
uses: softprops/action-gh-release@v2
76+
with:
77+
files: |
78+
artifacts/*.uf2
79+
artifacts/*.hex

0 commit comments

Comments
 (0)