Create AIRDOS04 Pre-Release (BETA) #10
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
name: Create AIRDOS04 Pre-Release (BETA) | |
on: | |
workflow_dispatch: | |
jobs: | |
build: | |
uses: ./.github/workflows/build_fw.yml | |
with: | |
build_type: B | |
secrets: inherit | |
release: | |
runs-on: ubuntu-latest | |
needs: [build] | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v3 | |
with: | |
ref: AIRDOS04A | |
- name: Gen Release Name and preare assets | |
id: gen_release_name | |
run: | | |
MAJOR=`cat fw/AIRDOS04/nextversion|grep MAJOR|cut -d ' ' -f 2` | |
MINOR=`cat fw/AIRDOS04/nextversion|grep MINOR|cut -d ' ' -f 2` | |
NEXTRELEASE=`cat fw/AIRDOS04/nextversion|grep RELEASE|cut -d ' ' -f 2` | |
NEXTBUILD=`cat fw/AIRDOS04/nextversion|grep BUILD|cut -d ' ' -f 2` | |
RELEASE=`echo $NEXTRELEASE"-1"|bc` | |
BUILD=`echo $NEXTBUILD"-1"|bc` | |
echo "tagname=AIRDOS04-${MAJOR}.${MINOR}.${RELEASE}-BETA-${BUILD}" >> $GITHUB_OUTPUT | |
- name: Create TAG | |
run: | | |
echo "${{ steps.gen_release_name.outputs.tagname }}" | |
git config user.name "${GITHUB_ACTOR}" | |
git config user.email "${GITHUB_ACTOR}@users.noreply.github.com" | |
git tag -a ${{ steps.gen_release_name.outputs.tagname }} -m "Release ${{ steps.gen_release_name.outputs.tagname }}" | |
git push origin ${{ steps.gen_release_name.outputs.tagname }} | |
- name: Create Release | |
id: create_release | |
uses: actions/create-release@v1 | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
with: | |
tag_name: ${{ steps.gen_release_name.outputs.tagname }} | |
release_name: BETA ${{ steps.gen_release_name.outputs.tagname }} | |
draft: false | |
prerelease: true | |
- name: Upload Release Assets | |
id: upload-release-assets | |
uses: dwenegar/upload-release-assets@v1 | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
with: | |
release_id: ${{ steps.create_release.outputs.id }} | |
assets_path: fw/build/*.hex | |