123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475 |
- 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=ref::$(echo ${{ github.ref }} | sed -e's#.*/##')"
- - name: Dependency packages (apt)
- run: |
- sudo apt update
- sudo apt -y install git gcc-arm-none-eabi python3-pip srecord stm32flash zip
- - name: Dependency packages (pip)
- run: python3 -m pip install --user bitarray crcmod pyserial
- - name: Build dist
- run: make dist
- - name: Upload artifacts
- uses: actions/upload-artifact@v2
- with:
- name: greaseweazle-firmware.ci.${{ steps.vars.outputs.ref }}
- path: greaseweazle-firmware-${{ steps.vars.outputs.ref }}.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=ref::$(echo ${{ github.ref }} | sed -e's#.*/##')"
- - name: Download artifacts
- uses: actions/download-artifact@v2
- with:
- name: greaseweazle-firmware.ci.${{ steps.vars.outputs.ref }}
- - 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.ref }}
- 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.ref }}.zip
- asset_name: greaseweazle-firmware-${{ steps.vars.outputs.ref }}.zip
- asset_content_type: application/zip
|