From 873c49a4813673795a86f2bf4bc93d4a71cf494b Mon Sep 17 00:00:00 2001 From: Zach Radlicz Date: Tue, 25 Mar 2025 14:08:52 -0500 Subject: [PATCH] cleaned workflows --- .github/workflows/README.md | 5 +++-- .github/workflows/manual-release.yaml | 2 +- .github/workflows/manual-upload.yaml | 2 +- .github/workflows/release-workflow.yaml | 19 ++++++------------- 4 files changed, 11 insertions(+), 17 deletions(-) diff --git a/.github/workflows/README.md b/.github/workflows/README.md index 9be4b0c..66c37f8 100644 --- a/.github/workflows/README.md +++ b/.github/workflows/README.md @@ -21,10 +21,11 @@ Each job only runs if the previous job succeeds, providing a complete validation ### Release Workflow (`release-workflow.yaml`) Triggered in the following scenarios: -- When a PR is merged to `master` (note: closing without merging won't trigger the release) -- When code is pushed directly to `master` +- When code is pushed to `master` (including PR merges) - Manually from the GitHub Actions tab +Note: The workflow has been simplified to only trigger on push events to avoid running twice when PRs are merged. + This workflow has two sequential jobs: 1. **Release**: diff --git a/.github/workflows/manual-release.yaml b/.github/workflows/manual-release.yaml index 537b147..e8a89a8 100644 --- a/.github/workflows/manual-release.yaml +++ b/.github/workflows/manual-release.yaml @@ -41,7 +41,7 @@ jobs: with: particle-platform-name: 'bsom' auto-version: ${{ github.event.inputs.force_version_increment == 'yes' }} - device-os-version: 6.1.1 + device-os-version: 6.2.1 - name: Upload artifacts uses: actions/upload-artifact@v4 diff --git a/.github/workflows/manual-upload.yaml b/.github/workflows/manual-upload.yaml index d1feb0b..7b69dc6 100644 --- a/.github/workflows/manual-upload.yaml +++ b/.github/workflows/manual-upload.yaml @@ -41,7 +41,7 @@ jobs: uses: particle-iot/compile-action@v1 with: particle-platform-name: 'bsom' - device-os-version: 6.1.1 + device-os-version: 6.2.1 - name: Download release artifacts if: github.event.inputs.use_release_artifact == 'yes' diff --git a/.github/workflows/release-workflow.yaml b/.github/workflows/release-workflow.yaml index aeb8297..59f1b8f 100644 --- a/.github/workflows/release-workflow.yaml +++ b/.github/workflows/release-workflow.yaml @@ -1,17 +1,12 @@ name: Release Workflow on: - # Runs on direct push to master + # Runs on direct push to master, but we'll check if it's from a PR merge in the job condition push: branches: - master # or 'main' depending on your main branch - # Runs on PR completion (merge or close) - pull_request: - types: - - closed - branches: - - master # or 'main' depending on your main branch + # Removed pull_request trigger to avoid duplicate runs # Allows manual triggering from the Actions tab workflow_dispatch: @@ -28,12 +23,9 @@ jobs: release: name: Compile and Release # Run this job if: - # 1. Direct push to master, or - # 2. PR was merged (not just closed), or - # 3. Manually triggered - if: github.event_name == 'push' || - (github.event_name == 'pull_request' && github.event.pull_request.merged == true) || - github.event_name == 'workflow_dispatch' + # 1. Any push to master (including PR merges) + # 2. Manually triggered + if: github.event_name == 'push' || github.event_name == 'workflow_dispatch' runs-on: ubuntu-latest outputs: firmware-path: ${{ steps.compile.outputs.firmware-path }} @@ -45,6 +37,7 @@ jobs: uses: actions/checkout@v4 with: submodules: recursive + fetch-depth: 0 - name: Compile application id: compile