Skip to content

Commit

Permalink
Fix workflow output names, regex, & bump version
Browse files Browse the repository at this point in the history
  • Loading branch information
bandogora committed Feb 14, 2024
1 parent d8eefdd commit e9279d3
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 12 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ jobs:
run: west update

- name: Create west cache
if: ${{ steps.west-cache.outputs.cache-hit != 'true' }}
if: steps.west-cache.outputs.cache-hit != 'true'
uses: actions/cache/save@v4
with:
path: |
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -47,8 +47,8 @@ jobs:
"https://api.github.com/repos/${OWNER}/${REPO}/releases" \
-d '{"tag_name":"${{ env.version }}","target_commitish":"${BRANCH}","draft":false,"prerelease":false,"generate_release_notes":true}' \
-o release.json
echo "release_id=$(grep -Po '"id":.*?[^\\]",' release.json)" >> "$GITHUB_ENV"
echo "upload_url=$(grep -Po '"upload_url":.*?[^\\]",' release.json)" >> "$GITHUB_ENV"
echo "release_id=$(grep -Poza '(?:\G(?!^)",|"id":\s*)\s*"*\K[^",]+' release.json)" >> "$GITHUB_ENV"
echo "upload_url=$(grep -Poza '(?:\G(?!^)",|"upload_url":\s*)\s*"*\K[^",]+' release.json)" >> "$GITHUB_ENV"
- name: Download merged.hex
uses: actions/download-artifact@v4
Expand Down
15 changes: 7 additions & 8 deletions .github/workflows/version_check.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@ jobs:
version_check:
runs-on: ubuntu-latest
outputs:
version_increased: ${{ steps.version_up.outputs.vup }}
version_tag: ${{ steps.version_tag.outputs.tag }}
vup: ${{ steps.version_up.outputs.vup }}
vtag: ${{ steps.version_tag.outputs.vtag }}
steps:
- name: Git checkout
uses: actions/checkout@v4
Expand All @@ -23,25 +23,24 @@ jobs:
echo "vup=$vup" >> "$GITHUB_OUTPUT"
echo "Version increased: $vup" >> $GITHUB_STEP_SUMMARY
- name: Create version tag
if: ${{ steps.version_up.outputs.version_up == true }}
if: steps.version_up.outputs.vup == 'true'
id: version_tag
run: |
tag=v$(awk 'NR<4{printf "%s%s", sep, $3; sep="."} END{print ""}' app/VERSION)
echo "tag=$tag" >> "$GITHUB_OUTPUT"
echo "vtag=$tag" >> "$GITHUB_OUTPUT"
echo "Version tag: $tag" >> $GITHUB_STEP_SUMMARY
release:
if: ${{ needs.version_check.outputs.version_up == true }}
if: needs.version_check.outputs.vup == 'true'
needs: version_check
uses: ./.github/workflows/release.yml
with:
version_tag: ${{ needs.version_check.outputs.version_tag }}
version_tag: ${{ needs.version_check.outputs.vtag }}
secrets: inherit

build:
if: ${{ needs.version_check.outputs.version_up == false }}
if: needs.version_check.outputs.vup == 'false'
needs: version_check
uses: ./.github/workflows/build.yml
with:
Expand Down
2 changes: 1 addition & 1 deletion app/VERSION
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
VERSION_MAJOR = 0
VERSION_MINOR = 2
PATCHLEVEL = 0
PATCHLEVEL = 1
VERSION_TWEAK = 0
EXTRAVERSION = nightly

0 comments on commit e9279d3

Please sign in to comment.