Skip to content

Commit 9689b8c

Browse files
Update GitHub Actions workflow for release process
1 parent a754801 commit 9689b8c

1 file changed

Lines changed: 9 additions & 3 deletions

File tree

.github/workflows/main.yml

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,8 @@
11
name: Flash CLI CI + Conditional Release
22

3+
permissions:
4+
contents: write # REQUIRED to create GitHub releases
5+
36
on:
47
push:
58
branches: ["main"]
@@ -12,6 +15,7 @@ jobs:
1215
# ------------------------------
1316
ci:
1417
runs-on: ubuntu-latest
18+
1519
steps:
1620
- name: Checkout code
1721
uses: actions/checkout@v3
@@ -39,7 +43,7 @@ jobs:
3943
fi
4044
4145
# -------------------------------------------------------
42-
# 2. RELEASE JOB (Runs only on push to main)
46+
# 2. RELEASE JOB (Only on push to main)
4347
# -------------------------------------------------------
4448
release:
4549
needs: ci
@@ -73,15 +77,16 @@ jobs:
7377
- name: Stop if version did not change
7478
if: env.changed == 'false'
7579
run: |
76-
echo "version.h not changed → skip release"
80+
echo "version.h not changed → skipping release"
7781
exit 0
7882
83+
# Extract version text
7984
- name: Extract version from version.h
8085
run: |
8186
VERSION=$(grep "RELEASE_VERSION" lib/version.h | cut -d '"' -f2)
8287
echo "VERSION=$VERSION" >> $GITHUB_ENV
8388
84-
# Linux build of final binary
89+
# Build final binary
8590
- name: Build Linux binary
8691
run: gcc Flash-cli.c -o flash-linux-x64 -lcurl
8792

@@ -90,6 +95,7 @@ jobs:
9095
run: |
9196
echo "TITLE=${{ github.event.head_commit.message }}" >> $GITHUB_ENV
9297
98+
# Create GitHub Release
9399
- name: Create GitHub Release
94100
uses: softprops/action-gh-release@v1
95101
with:

0 commit comments

Comments
 (0)