Skip to content

Commit 525df75

Browse files
authored
Merge pull request #18 from gemsiot/fix/workflow_cleanup
Cleaned up workflows, particularly release workflow
2 parents 878fe62 + 873c49a commit 525df75

4 files changed

Lines changed: 11 additions & 17 deletions

File tree

.github/workflows/README.md

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,10 +21,11 @@ Each job only runs if the previous job succeeds, providing a complete validation
2121
### Release Workflow (`release-workflow.yaml`)
2222

2323
Triggered in the following scenarios:
24-
- When a PR is merged to `master` (note: closing without merging won't trigger the release)
25-
- When code is pushed directly to `master`
24+
- When code is pushed to `master` (including PR merges)
2625
- Manually from the GitHub Actions tab
2726

27+
Note: The workflow has been simplified to only trigger on push events to avoid running twice when PRs are merged.
28+
2829
This workflow has two sequential jobs:
2930

3031
1. **Release**:

.github/workflows/manual-release.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ jobs:
4141
with:
4242
particle-platform-name: 'bsom'
4343
auto-version: ${{ github.event.inputs.force_version_increment == 'yes' }}
44-
device-os-version: 6.1.1
44+
device-os-version: 6.2.1
4545

4646
- name: Upload artifacts
4747
uses: actions/upload-artifact@v4

.github/workflows/manual-upload.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ jobs:
4141
uses: particle-iot/compile-action@v1
4242
with:
4343
particle-platform-name: 'bsom'
44-
device-os-version: 6.1.1
44+
device-os-version: 6.2.1
4545

4646
- name: Download release artifacts
4747
if: github.event.inputs.use_release_artifact == 'yes'

.github/workflows/release-workflow.yaml

Lines changed: 6 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,12 @@
11
name: Release Workflow
22

33
on:
4-
# Runs on direct push to master
4+
# Runs on direct push to master, but we'll check if it's from a PR merge in the job condition
55
push:
66
branches:
77
- master # or 'main' depending on your main branch
88

9-
# Runs on PR completion (merge or close)
10-
pull_request:
11-
types:
12-
- closed
13-
branches:
14-
- master # or 'main' depending on your main branch
9+
# Removed pull_request trigger to avoid duplicate runs
1510

1611
# Allows manual triggering from the Actions tab
1712
workflow_dispatch:
@@ -28,12 +23,9 @@ jobs:
2823
release:
2924
name: Compile and Release
3025
# Run this job if:
31-
# 1. Direct push to master, or
32-
# 2. PR was merged (not just closed), or
33-
# 3. Manually triggered
34-
if: github.event_name == 'push' ||
35-
(github.event_name == 'pull_request' && github.event.pull_request.merged == true) ||
36-
github.event_name == 'workflow_dispatch'
26+
# 1. Any push to master (including PR merges)
27+
# 2. Manually triggered
28+
if: github.event_name == 'push' || github.event_name == 'workflow_dispatch'
3729
runs-on: ubuntu-latest
3830
outputs:
3931
firmware-path: ${{ steps.compile.outputs.firmware-path }}
@@ -45,6 +37,7 @@ jobs:
4537
uses: actions/checkout@v4
4638
with:
4739
submodules: recursive
40+
fetch-depth: 0
4841

4942
- name: Compile application
5043
id: compile

0 commit comments

Comments
 (0)