Skip to content

Commit

Permalink
add pack
Browse files Browse the repository at this point in the history
  • Loading branch information
Jiu-xiao committed Jan 24, 2024
1 parent 6684d02 commit 37cc8a7
Showing 1 changed file with 27 additions and 0 deletions.
27 changes: 27 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -46,3 +46,30 @@ jobs:

- name: Build
run: cd XRobot && export HOME=/root && bash -c "python project.py build demo_board blink"

- name: Pack firmware
run: zip -r ./firmware.zip ./XRobot/firmware

- name: Create release
run: echo "release_name=$(date +v%Y.%m.%d.vv%H.%M)" >> $GITHUB_ENV

- uses: actions/create-release@v1
id: create_release
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
tag_name: ${{ env.release_name }}
release_name: Release ${{ env.release_name }}
draft: false
prerelease: false

- name: Upload firmware
uses: actions/upload-release-asset@v1
id: upload-firmware
env:
GITHUB_TOKEN: ${{ github.token }}
with:
upload_url: ${{ steps.create_release.outputs.upload_url }}
asset_path: ${{github.workspace}}/firmware.zip
asset_name: firmware.zip
asset_content_type: application/zip

0 comments on commit 37cc8a7

Please sign in to comment.