1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677 |
- on:
- push:
- tags:
- - 'v*.*'
- name: Release
- jobs:
- build-ubuntu:
- runs-on: ubuntu-20.04
- steps:
- - uses: actions/checkout@v2
- - name: Set environment variables
- id: vars
- run: |
- echo "::set-output name=ver::$(echo ${{ github.ref }} | sed -e's#.*/v##')"
- - name: Dependency packages (apt)
- run: |
- sudo apt update
- sudo apt -y install git gcc-arm-none-eabi python3-pip srecord zip
- - name: Dependency packages (pip)
- run: python3 -m pip install --user crcmod
- - name: Build dist
- run: |
- make -j4 dist
- mv out/*.zip .
- - name: Upload artifacts
- uses: actions/upload-artifact@v2
- with:
- name: greaseweazle-firmware.ci.${{ steps.vars.outputs.ver }}
- path: greaseweazle-firmware-${{ steps.vars.outputs.ver }}.zip
- finalise:
- needs: build-ubuntu
- runs-on: ubuntu-20.04
- steps:
- - uses: actions/checkout@v2
- - name: Set environment variables
- id: vars
- run: |
- echo "::set-output name=ver::$(echo ${{ github.ref }} | sed -e's#.*/v##')"
- - name: Download artifacts
- uses: actions/download-artifact@v2
- with:
- name: greaseweazle-firmware.ci.${{ steps.vars.outputs.ver }}
- - name: Create Release
- id: create_release
- uses: actions/create-release@v1
- env:
- GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- with:
- tag_name: ${{ github.ref }}
- release_name: Greaseweazle Firmware ${{ steps.vars.outputs.ver }}
- body: "[**Release Notes:**](https://github.com/keirf/greaseweazle-firmware/blob/master/RELEASE_NOTES)"
- draft: false
- prerelease: false
- - name: Upload Release Asset
- uses: actions/upload-release-asset@v1
- env:
- GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- with:
- upload_url: ${{ steps.create_release.outputs.upload_url }}
- asset_path: greaseweazle-firmware-${{ steps.vars.outputs.ver }}.zip
- asset_name: greaseweazle-firmware-${{ steps.vars.outputs.ver }}.zip
- asset_content_type: application/zip
|