-
-
Notifications
You must be signed in to change notification settings - Fork 148
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #577 from blckmn/release-process
Automated release build process as per configurator
- Loading branch information
Showing
2 changed files
with
53 additions
and
8 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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-22.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 }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters