diff --git a/.github/workflows/ci-master.yml b/.github/workflows/ci-build.yml similarity index 96% rename from .github/workflows/ci-master.yml rename to .github/workflows/ci-build.yml index 4215f6b4..e135ac4b 100644 --- a/.github/workflows/ci-master.yml +++ b/.github/workflows/ci-build.yml @@ -2,13 +2,16 @@ on: push: branches: - master - - feature/captive-portal-ci + - develop pull_request: branches: - master + - develop types: [opened, reopened, synchronize] + workflow_call: # When another workflow invokes this one. + workflow_dispatch: # Manually invoked by user. -name: ci-master +name: ci-build env: NODE_VERSION: 16 diff --git a/.github/workflows/ci-tag.yml b/.github/workflows/ci-tag.yml index 8a0fab89..835fd5ad 100644 --- a/.github/workflows/ci-tag.yml +++ b/.github/workflows/ci-tag.yml @@ -1,5 +1,7 @@ on: push: + branches: + - feature/captive-portal-ci tags: - 'v**' @@ -11,44 +13,14 @@ env: jobs: - # Copied verbatim from https://docs.platformio.org/en/stable/integration/ci/github-actions.html - build: - runs-on: ubuntu-latest - - steps: - - uses: actions/checkout@v4 - - - uses: actions/cache@v3 - with: - path: | - ~/.cache/pip - ~/.platformio/platforms - ~/.platformio/packages - ~/.platformio/cache - key: ${{ runner.os }}-arch - - - uses: actions/setup-python@v4 - with: - python-version: '3.9' - - - name: Install PlatformIO Core - run: pip install --upgrade platformio - - - name: Build PlatformIO Project - run: pio run - - - name: Upload internal artifacts - uses: actions/upload-artifact@v3 - with: - name: firmware.bin - path: .pio/build/ShockLink/firmware.bin - retention-days: 1 - - publish: + build-and-publish: runs-on: ubuntu-latest needs: build steps: + - name: Build project + uses: ./.github/workflows/ci-build.yml + - name: Download release notes uses: actions/checkout@v4 with: @@ -58,7 +30,7 @@ jobs: - name: Download internal artifacts uses: actions/download-artifact@v3 with: - name: firmware.bin + name: merged-firmware.bin # This step reads a file from repo and use it for body of the release # This works on any self-hosted runner OS @@ -76,7 +48,7 @@ jobs: uses: svenstaro/upload-release-action@v2 with: repo_token: ${{ secrets.GITHUB_TOKEN }} - file: firmware.bin + file: merged-firmware.bin asset_name: ShockLink.bin tag: ${{ github.ref }} body: |