From febd5e96ecbfb338f43823a26ec69646cdb69677 Mon Sep 17 00:00:00 2001 From: Atsunori Saito Date: Fri, 17 Dec 2021 11:47:25 +0900 Subject: [PATCH] Added release action. --- .github/workflows/release.yml | 52 +++++++++++++++++++++++++++++++++++ 1 file changed, 52 insertions(+) create mode 100644 .github/workflows/release.yml diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml new file mode 100644 index 0000000..c2601a5 --- /dev/null +++ b/.github/workflows/release.yml @@ -0,0 +1,52 @@ +name: release + +on: + push: + tags: + - 'v*' + +jobs: + build: + container: + image: ghcr.io/armmbed/mbed-os-env:master-latest + runs-on: ubuntu-latest + env: + SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL }} + strategy: + matrix: + target: [LEXXPLUSS_PB01] + profile: [release] + steps: + - name: checkout + uses: actions/checkout@v2 + - name: build + run: | + set -e + mbed-tools deploy + mbed-tools compile -t GCC_ARM -m ${{ matrix.target }} --profile ${{ matrix.profile }} + - name: release + id: create_release + uses: actions/create-release@v1 + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + with: + tag_name: ${{ github.ref }} + release_name: Release ${{ github.ref }} + draft: false + prerelease: false + - name: upload + id: 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: ./cmake_build/LEXXPLUSS_PB01/develop/GCC_ARM/mbed-os-powerboard.bin + asset_name: mbed-os-powerboard.bin + asset_content_type: application/octet-stream + - uses: act10ns/slack@v1 + with: + status: ${{ job.status }} + steps: ${{ toJson(steps) }} + channel: '#div-02-robotics-ci' + if: always()