Skip to content

Commit

Permalink
Update Publish.yaml
Browse files Browse the repository at this point in the history
  • Loading branch information
Spooks4576 committed Mar 22, 2024
1 parent 816ee0c commit c9237ea
Showing 1 changed file with 13 additions and 3 deletions.
16 changes: 13 additions & 3 deletions .github/workflows/Publish.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -30,16 +30,26 @@ jobs:
- name: Tar artifacts
run: tar -czvf ${{ matrix.board }}.tar.gz -C .pio/build/${{ matrix.board }} firmware.bin partitions.bin bootloader.bin

- name: Get commit message
id: get_commit_message
run: echo "COMMIT_MESSAGE=$(git log -1 --pretty=%B)" >> $GITHUB_ENV
- name: Fetch all tags
run: git fetch --depth=1 origin +refs/tags/*:refs/tags/*

- name: Calculate new tag name
id: new_tag
run: |
highest_tag=$(git tag -l 'release-*' | sort -V | tail -n1)
highest_num=${highest_tag##*-}
new_num=$((highest_num + 1))
echo "New tag will be release-$new_num"
echo "::set-output name=tag::release-$new_num"
- name: Create Release
id: create_release
uses: softprops/action-gh-release@v1
with:
files: |
./${{ matrix.board }}.tar.gz
tag_name: ${{ steps.new_tag.outputs.tag }}
name: ${{ steps.new_tag.outputs.tag }}
draft: false
prerelease: false
env:
Expand Down

0 comments on commit c9237ea

Please sign in to comment.