From c7388a3518c5acdc71d353f45c3ac9d502057b0a Mon Sep 17 00:00:00 2001 From: Clemens Elflein Date: Mon, 8 Aug 2022 14:38:21 +0200 Subject: [PATCH] Revert "feat(GH): combine and reuse workflows (#26)" This reverts commit da192fbde8b26977d15c88d280d772d6cb84cfcc. --- .github/workflows/ci.yaml | 112 ------------------ .github/workflows/kibot-commit-check.yaml | 17 +++ .github/workflows/kibot-release-from-tag.yaml | 48 ++++++++ 3 files changed, 65 insertions(+), 112 deletions(-) delete mode 100644 .github/workflows/ci.yaml create mode 100644 .github/workflows/kibot-commit-check.yaml create mode 100644 .github/workflows/kibot-release-from-tag.yaml diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml deleted file mode 100644 index ab61ca79..00000000 --- a/.github/workflows/ci.yaml +++ /dev/null @@ -1,112 +0,0 @@ -name: CI - -on: [push] - -jobs: - erc-drc-checks: - runs-on: ubuntu-latest - if: github.ref_type != 'tag' - steps: - - uses: actions/checkout@v3 - with: - fetch-depth: 0 - - uses: INTI-CMNB/KiBot@v2_k6 - with: - config: Hardware/OpenMowerMainboard/OpenMowerMainboard.kibot.yaml - board: Hardware/OpenMowerMainboard/OpenMowerMainboard.kicad_pcb - verbose: 1 - - firmware: - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v2 - - name: Cache pip - uses: actions/cache@v2 - with: - path: ~/.cache/pip - key: ${{ runner.os }}-pip-${{ hashFiles('**/requirements.txt') }} - restore-keys: | - ${{ runner.os }}-pip- - - name: Cache PlatformIO - uses: actions/cache@v2 - with: - path: ~/.platformio - key: ${{ runner.os }}-${{ hashFiles('**/lockfiles') }} - - name: Set up Python - uses: actions/setup-python@v2 - - name: Install PlatformIO - run: | - python -m pip install --upgrade pip - pip install --upgrade platformio - - name: Run PlatformIO - run: pio run -d Firmware/LowLevel - - name: Copy Artifacts - run: | - mkdir artifacts - mkdir ./artifacts/ELFLEIN_PROTOTYPE - cp Firmware/LowLevel/.pio/build/ELFLEIN_PROTOTYPE/firmware.bin ./artifacts/ELFLEIN_PROTOTYPE - cp Firmware/LowLevel/.pio/build/ELFLEIN_PROTOTYPE/firmware.uf2 ./artifacts/ELFLEIN_PROTOTYPE - mkdir ./artifacts/MPU9250 - cp Firmware/LowLevel/.pio/build/MPU9250/firmware.bin ./artifacts/MPU9250 - cp Firmware/LowLevel/.pio/build/MPU9250/firmware.uf2 ./artifacts/MPU9250 - mkdir ./artifacts/WT901_INSTEAD_OF_SOUND - cp Firmware/LowLevel/.pio/build/WT901_INSTEAD_OF_SOUND/firmware.bin ./artifacts/WT901_INSTEAD_OF_SOUND - cp Firmware/LowLevel/.pio/build/WT901_INSTEAD_OF_SOUND/firmware.uf2 ./artifacts/WT901_INSTEAD_OF_SOUND - - name: Step 3 - Use the Upload Artifact GitHub Action - uses: actions/upload-artifact@v3 - with: - name: open-mower-pico-firmware - path: artifacts/ - - tagged-release: - runs-on: ubuntu-latest - if: github.ref_type == 'tag' && startsWith(github.ref_name, 'v') - needs: firmware - steps: - - uses: actions/checkout@v3 - with: - fetch-depth: 0 - - uses: INTI-CMNB/KiBot@v2_k6 - with: - config: Hardware/OpenMowerMainboard/OpenMowerMainboard.kibot.yaml - board: Hardware/OpenMowerMainboard/OpenMowerMainboard.kicad_pcb - skip: run_drc,run_erc - - - name: 'Fix permissions on release/' - run: sudo chmod 0777 release - - - uses: actions/download-artifact@v3 - with: - name: open-mower-pico-firmware - path: firmware - - - name: Create firmware zip - run: zip -r release/firmware.zip firmware - - - uses: "marvinpinto/action-automatic-releases@latest" - with: - repo_token: "${{ secrets.GITHUB_TOKEN }}" - prerelease: false - files: release/* - - - name: Deploy release - uses: peaceiris/actions-gh-pages@v3 - with: - github_token: ${{ secrets.GITHUB_TOKEN }} - publish_dir: release - destination_dir: release - - - name: Deploy release_navigator - uses: peaceiris/actions-gh-pages@v3 - with: - github_token: ${{ secrets.GITHUB_TOKEN }} - publish_dir: release_navigator - destination_dir: release_navigator - keep_files: true - - - name: Deploy release_navigator index - uses: peaceiris/actions-gh-pages@v3 - with: - github_token: ${{ secrets.GITHUB_TOKEN }} - publish_dir: release_navigator - keep_files: true diff --git a/.github/workflows/kibot-commit-check.yaml b/.github/workflows/kibot-commit-check.yaml new file mode 100644 index 00000000..5899db63 --- /dev/null +++ b/.github/workflows/kibot-commit-check.yaml @@ -0,0 +1,17 @@ +name: CI + +on: [push] + +jobs: + erc-drc-checks: + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@v3 + with: + fetch-depth: 0 + - uses: INTI-CMNB/KiBot@v2_k6 + with: + config: Hardware/OpenMowerMainboard/OpenMowerMainboard.kibot.yaml + board: Hardware/OpenMowerMainboard/OpenMowerMainboard.kicad_pcb + verbose: 1 diff --git a/.github/workflows/kibot-release-from-tag.yaml b/.github/workflows/kibot-release-from-tag.yaml new file mode 100644 index 00000000..7cdcb97b --- /dev/null +++ b/.github/workflows/kibot-release-from-tag.yaml @@ -0,0 +1,48 @@ +name: tagged-release + +on: + push: + tags: + - "v*" + +jobs: + tagged-release: + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@v3 + with: + fetch-depth: 0 + - uses: INTI-CMNB/KiBot@v2_k6 + with: + config: Hardware/OpenMowerMainboard/OpenMowerMainboard.kibot.yaml + board: Hardware/OpenMowerMainboard/OpenMowerMainboard.kicad_pcb + skip: run_drc,run_erc + + - uses: "marvinpinto/action-automatic-releases@latest" + with: + repo_token: "${{ secrets.GITHUB_TOKEN }}" + prerelease: false + files: release/* + + - name: Deploy release + uses: peaceiris/actions-gh-pages@v3 + with: + github_token: ${{ secrets.GITHUB_TOKEN }} + publish_dir: release + destination_dir: release + + - name: Deploy release_navigator + uses: peaceiris/actions-gh-pages@v3 + with: + github_token: ${{ secrets.GITHUB_TOKEN }} + publish_dir: release_navigator + destination_dir: release_navigator + keep_files: true + + - name: Deploy release_navigator index + uses: peaceiris/actions-gh-pages@v3 + with: + github_token: ${{ secrets.GITHUB_TOKEN }} + publish_dir: release_navigator + keep_files: true