Skip to content

Commit

Permalink
Use github.run_number instead of semver for versioning beta
Browse files Browse the repository at this point in the history
  • Loading branch information
dylanbeattie committed Oct 13, 2024
1 parent ae3d86c commit 8282ce6
Showing 1 changed file with 12 additions and 10 deletions.
22 changes: 12 additions & 10 deletions .github/workflows/build-wasm-and-linux-binaries.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,17 +26,19 @@ jobs:
- name: Install .NET WASM workloads
working-directory: ./Starship
run: dotnet workload install wasm-tools
- name: Get Next Version
id: semver
uses: ietf-tools/semver-action@v1
with:
token: ${{ github.token }}
branch: main
noVersionBumpBehavior: patch
# - name: Get Next Version
# id: semver
# uses: ietf-tools/semver-action@v1
# with:
# token: ${{ github.token }}
# branch: main
# noVersionBumpBehavior: patch
- name: "Display build version"
run: echo "tag v2.0.0-beta.${{ steps.semver.outputs.nextStrict }}"
# run: echo "tag v2.0.0-beta.${{ steps.semver.outputs.nextStrict }}"
run: echo "tag v2.0.0-beta.${{ github.run_number }}"
- name: Patch VERSION constant inside Starship/Rockstar.Engine/RockstarEnvironment.cs
run: sed -i 's/VERSION = "[^"]*";/VERSION = "v2.0.0-beta.${{ steps.semver.outputs.nextStrict }}";/g' Starship/Rockstar.Engine/RockstarEnvironment.cs
# run: sed -i 's/VERSION = "[^"]*";/VERSION = "v2.0.0-beta.${{ steps.semver.outputs.nextStrict }}";/g' Starship/Rockstar.Engine/RockstarEnvironment.cs
run: sed -i 's/VERSION = "[^"]*";/VERSION = "v2.0.0-beta.${{ github.run_number }}";/g' Starship/Rockstar.Engine/RockstarEnvironment.cs
- name: Build Rockstar
run: dotnet build Starship -c Release
- name: Test Rockstar
Expand All @@ -51,7 +53,7 @@ jobs:
run: |
git config --global user.name 'workflows/build-wasm-and-linux-binaries.yml'
git config --global user.email 'dylanbeattie@users.noreply.github.com'
git commit -am "[skip actions] set VERSION = v2.0.0-beta.${{ steps.semver.outputs.nextStrict }} in RockstarEnvironment.cs"
git commit -am "[skip actions] set VERSION = v2.0.0-beta.${{ github.run_number }} in RockstarEnvironment.cs"
git push
- name: dotnet publish WASM engine
run: dotnet publish Starship/Rockstar.Wasm -o rockstar-wasm-binary -c Release
Expand Down

0 comments on commit 8282ce6

Please sign in to comment.