Skip to content

Commit

Permalink
fix build and release
Browse files Browse the repository at this point in the history
  • Loading branch information
Unreal-Dan committed Jul 14, 2024
1 parent c463c9d commit 1115c01
Show file tree
Hide file tree
Showing 2 changed files with 38 additions and 28 deletions.
26 changes: 16 additions & 10 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,23 +23,27 @@ jobs:
run: |
zip -r "helioscli.zip" .
working-directory: HeliosCLI
- name: Upload HeliosCLI Artifact
uses: actions/upload-artifact@v4
- name: Cache HeliosCLI Artifact
uses: actions/cache@v4
with:
name: helioscli-artifacts
path: HeliosCLI/helioscli.zip
key: ${{ runner.os }}-helioscli-${{ github.sha }}
restore-keys: |
${{ runner.os }}-helioscli-
tests:
needs: build
runs-on: ubuntu-latest
steps:
- name: Checkout current repository
uses: actions/checkout@v4
- name: Download HeliosCLI Artifact
uses: actions/download-artifact@v4
- name: Restore HeliosCLI Artifact
uses: actions/cache@v4
with:
name: helioscli-artifacts
path: ./HeliosCLI
path: HeliosCLI/helioscli.zip
key: ${{ runner.os }}-helioscli-${{ github.sha }}
restore-keys: |
${{ runner.os }}-helioscli-
- name: Set execute permissions for test script
run: chmod +x ./runtests.sh
working-directory: tests
Expand Down Expand Up @@ -67,9 +71,11 @@ jobs:
run: |
zip -r "embedded-firmware.zip" .
working-directory: HeliosEmbedded
- name: Upload HeliosEmbedded Artifact
uses: actions/upload-artifact@v4
- name: Cache HeliosEmbedded Artifact
uses: actions/cache@v4
with:
name: embedded-firmware
path: HeliosEmbedded/embedded-firmware.zip
key: ${{ runner.os }}-embedded-${{ github.sha }}
restore-keys: |
${{ runner.os }}-embedded-
40 changes: 22 additions & 18 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,28 @@ jobs:
git tag ${{ env.new_tag }}
git push origin ${{ env.new_tag }}
- name: Restore HeliosCLI Artifact
uses: actions/cache@v4
with:
path: HeliosCLI/helioscli.zip
key: ${{ runner.os }}-helioscli-${{ github.sha }}
restore-keys: |
${{ runner.os }}-helioscli-
- name: Restore HeliosEmbedded Artifact
uses: actions/cache@v4
with:
path: HeliosEmbedded/embedded-firmware.zip
key: ${{ runner.os }}-embedded-${{ github.sha }}
restore-keys: |
${{ runner.os }}-embedded-
- name: Unzip HeliosCLI Artifact
run: unzip HeliosCLI/helioscli.zip -d ./artifact/unzipped/helioscli

- name: Unzip HeliosEmbedded Artifact
run: unzip HeliosEmbedded/embedded-firmware.zip -d ./artifact/unzipped/embedded

- name: Create GitHub Release
if: env.skip_release == 'false'
id: create_release
Expand All @@ -63,24 +85,6 @@ jobs:
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

- name: Download HeliosCLI Artifact
uses: actions/download-artifact@v4
with:
name: helioscli-artifacts
path: ./artifact

- name: Unzip HeliosCLI Artifact
run: unzip ./artifact/helioscli.zip -d ./artifact/unzipped/helioscli

- name: Download HeliosEmbedded Artifact
uses: actions/download-artifact@v4
with:
name: embedded-firmware
path: ./artifact

- name: Unzip HeliosEmbedded Artifact
run: unzip ./artifact/embedded-firmware.zip -d ./artifact/unzipped/embedded

- name: Upload Release Assets (helios.bin)
if: env.skip_release == 'false'
uses: actions/upload-release-asset@v1
Expand Down

0 comments on commit 1115c01

Please sign in to comment.