Skip to content

Commit

Permalink
chore: Add version to draft release (#114)
Browse files Browse the repository at this point in the history
Closes #113
  • Loading branch information
elementbound authored Nov 16, 2023
1 parent 8c1cb3f commit 5f26b7f
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 1 deletion.
11 changes: 10 additions & 1 deletion .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,10 +25,19 @@ jobs:
run: godot --version
- name: Build
run: sh/build.sh
- name: Parse version
id: version
run: |
sh/version.sh envvar >> "$GITHUB_OUTPUT"
sh/version.sh
- name: Delete draft release(s)
uses: hugo19941994/delete-draft-releases@v1.0.0
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Release
uses: softprops/action-gh-release@v1
with:
name: latest
name: ${{ steps.version.outputs.VERSION }}
files: build/*
draft: true
prerelease: true
4 changes: 4 additions & 0 deletions sh/version.sh
100644 → 100755
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ source sh/shared.sh
version_major="$(echo ${version} | cut -f1 -d.)"
version_minor="$(echo ${version} | cut -f2 -d.)"
version_patch="$(echo ${version} | cut -f3 -d.)"
version="$version_major.$version_minor.$version_patch"

persist="false"

Expand All @@ -31,6 +32,9 @@ if [ $1 == "bump" ]; then

version="$version_major.$version_minor.$version_patch"
persist="true"
elif [ $1 == "envvar" ]; then
echo "VERSION=v$version"
exit 0
fi

if [ "$persist" = "true" ]; then
Expand Down

0 comments on commit 5f26b7f

Please sign in to comment.