release.yml 1.7 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768
  1. on:
  2. push:
  3. tags:
  4. - 'v*.*'
  5. name: Release
  6. jobs:
  7. build-ubuntu:
  8. runs-on: ubuntu-22.04
  9. steps:
  10. - uses: actions/checkout@v3
  11. - name: Set environment variables
  12. id: vars
  13. run: |
  14. echo "ver=$(echo ${{ github.ref }} | sed -e's#.*/v##')" >> $GITHUB_OUTPUT
  15. - name: Dependency packages (apt)
  16. run: |
  17. sudo apt update
  18. sudo apt -y install git gcc-arm-none-eabi python3-pip srecord zip
  19. - name: Dependency packages (pip)
  20. run: python3 -m pip install --user crcmod
  21. - name: Build dist
  22. run: |
  23. make -j4 dist
  24. mv out/*.zip .
  25. - name: Upload artifacts
  26. uses: actions/upload-artifact@v3
  27. with:
  28. name: greaseweazle-firmware.ci.${{ steps.vars.outputs.ver }}
  29. path: greaseweazle-firmware-${{ steps.vars.outputs.ver }}.zip
  30. finalise:
  31. needs: build-ubuntu
  32. runs-on: ubuntu-22.04
  33. steps:
  34. - uses: actions/checkout@v3
  35. - name: Set environment variables
  36. id: vars
  37. run: |
  38. echo "ver=$(echo ${{ github.ref }} | sed -e's#.*/v##')" >> $GITHUB_OUTPUT
  39. - name: Download artifacts
  40. uses: actions/download-artifact@v3
  41. with:
  42. name: greaseweazle-firmware.ci.${{ steps.vars.outputs.ver }}
  43. - name: Create Release
  44. id: create_release
  45. uses: ncipollo/release-action@v1
  46. with:
  47. tag: ${{ github.ref }}
  48. token: ${{ secrets.GITHUB_TOKEN }}
  49. name: Greaseweazle Firmware ${{ steps.vars.outputs.ver }}
  50. body: "[**Release Notes:**](https://github.com/keirf/greaseweazle-firmware/blob/master/RELEASE_NOTES)"
  51. draft: false
  52. prerelease: false
  53. artifacts: greaseweazle-firmware-${{ steps.vars.outputs.ver }}.zip
  54. artifactContentType: application/zip