Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/betaflight/betaflight-configurator.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorblckmn <blackman@xtra.com.au>2022-04-11 12:59:03 +0300
committerblckmn <blackman@xtra.com.au>2022-04-11 12:59:03 +0300
commit5b39578353c97c6d5f8b4c3c3a780f49ec9883e8 (patch)
tree3a8b7740f05f5110bbd49792c77edb17a6cb72e2
parentca0e79a45e18cab6e22036c3d88c54e56b2a1693 (diff)
Adding a build and attach to release workflow (upon release creation).
-rw-r--r--.github/workflows/build-release.yml41
1 files changed, 41 insertions, 0 deletions
diff --git a/.github/workflows/build-release.yml b/.github/workflows/build-release.yml
new file mode 100644
index 00000000..97810cbf
--- /dev/null
+++ b/.github/workflows/build-release.yml
@@ -0,0 +1,41 @@
+## This is triggered by the publishing of a release, and will build the assets and attach them.
+
+name: On Release
+
+on:
+ release:
+ types: [published]
+
+jobs:
+ ci:
+ name: CI
+ uses: ./.github/workflows/ci.yml
+ with:
+ debug_build: false
+
+ release:
+ name: Attach Release Artifacts
+ needs: ci
+ runs-on: ubuntu-20.04
+ steps:
+ - name: Code Checkout
+ uses: actions/checkout@v2
+
+ - name: Fetch build artifacts
+ uses: actions/download-artifact@v2
+
+ - name: List assets
+ run: ls -al Betaflight-*/*
+
+ - name: Attach assets to release
+ run: |
+ set -x
+ assets=()
+ for asset in Betaflight-*/*; do
+ assets+=("-a" "$asset")
+ echo "$asset"
+ done
+ tag_name="${GITHUB_REF##*/}"
+ hub release edit "${assets[@]}" -m "" "$tag_name"
+ env:
+ GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}