Skip to content

Commit 1763580

Browse files
committed
feat(release): Add GitHub Actions workflow for automated release creation
This commit introduces a new GitHub Actions workflow that automates the process of creating releases when a tag is created. It includes steps for checking out the code, generating release artifacts, and creating a GitHub release with the generated files. Signed-off-by: Chiho Sin <[email protected]>
1 parent 3678af7 commit 1763580

File tree

1 file changed

+41
-0
lines changed

1 file changed

+41
-0
lines changed

.github/workflows/fobe-release.yml

Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
name: Release
2+
3+
on: [create]
4+
5+
concurrency:
6+
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }}
7+
cancel-in-progress: true
8+
9+
jobs:
10+
release:
11+
runs-on: ubuntu-latest
12+
if: github.event_name == 'create' && github.event.ref_type == 'tag'
13+
14+
steps:
15+
- name: Checkout code
16+
uses: actions/checkout@v4
17+
with:
18+
submodules: "true"
19+
20+
- name: Create release artifacts
21+
run: |
22+
chmod +x tools/create_release.sh
23+
./tools/create_release.sh
24+
25+
- name: Create GitHub Release
26+
uses: softprops/action-gh-release@v2
27+
with:
28+
files: build/*
29+
draft: false
30+
prerelease: false
31+
generate_release_notes: true
32+
env:
33+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
34+
35+
# - name: Trigger Arduino Package Index Update
36+
# run: |
37+
# curl -X POST https://api.github.com/repos/fobe-projects/fobe-arduino-index/dispatches \
38+
# -H "Accept: application/vnd.github+json" \
39+
# -H "Authorization: Bearer ${{ secrets.FOBE_ARDUINO_INDEX_REPO_TOKEN }}" \
40+
# -H "X-GitHub-Api-Version: 2022-11-28" \
41+
# -d '{"event_type":"package-index-update"}'

0 commit comments

Comments
 (0)