Skip to content

Commit

Permalink
Share variable between steps for the new tag version
Browse files Browse the repository at this point in the history
  • Loading branch information
nmlynch94 committed Dec 11, 2023
1 parent d56aa8b commit 7306113
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,16 +32,18 @@ jobs:
./build.sh
flatpak build-bundle ~/.local/share/flatpak/repo jagex-launcher.flatpak com.jagex.Launcher
- name: Tag this branch with incremented release version
id: new-tag
run: |
LAST_TAG=$(git describe --tags $(git rev-list --tags --max-count=1))
MAJOR=$(echo "$LAST_TAG" | cut -d. -f1)
MINOR=$(echo "$LAST_TAG" | cut -d. -f2)
PATCH=$(echo "$LAST_TAG" | cut -d. -f3)
NEW_VERSION="$MAJOR.$MINOR.$((PATCH+1))"
git tag "$NEW_VERSION"
git push "https://$GITHUB_ACTOR:${{ secrets.ACCESS_TOKEN }}@github.com/$GITHUB_REPOSITORY.git" --follow-tags
git push "https://$GITHUB_ACTOR:${{ secrets.ACCESS_TOKEN }}@github.com/$GITHUB_REPOSITORY.git" --tags
echo "NEW_TAG=$NEW_VERSION" >> $GITHUB_OUTPUT
- name: Release
uses: softprops/action-gh-release@v1
with:
files: jagex-launcher.flatpak
files: jagex-launcher.flatpak
tag_name: ${{ steps.new-tag.outputs.NEW_TAG }}

0 comments on commit 7306113

Please sign in to comment.