Skip to content

Commit

Permalink
added semversion check, version bump
Browse files Browse the repository at this point in the history
  • Loading branch information
mpmxyz committed Dec 16, 2023
1 parent f172d43 commit 72fe474
Show file tree
Hide file tree
Showing 4 changed files with 16 additions and 4 deletions.
1 change: 0 additions & 1 deletion .github/workflows/build-monkey.yml
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,6 @@ jobs:
ASSEMBLY_NAME: ""
- name: Test
run: |
mono --version
dotnet test --no-restore --configuration "Release" "${{ env.TEST_PROJECT_FILE }}"
dotnet test --no-restore --configuration "Debug" "${{ env.MOD_LOADER_TEST_PROJECT_FILE }}"
env:
Expand Down
15 changes: 14 additions & 1 deletion .github/workflows/create-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,11 +12,11 @@ on:
type: string
required: false
description: "Title"
default: ""
description:
type: string
required: true
description: "Description of changes"
default: ""
release-rml:
type: boolean
required: false
Expand All @@ -33,9 +33,21 @@ env:
RML_MANIFEST_TOKEN: "${{ secrets.RML_MANIFEST_TOKEN }}"
name: "Create Release"
jobs:
check-inputs:
runs-on: ubuntu-latest
steps:
- name: "Check version format"
env:
RELEASE_VERSION: "${{ inputs.version }}"
shell: bash
run: |
# https://semver.org/ applied to https://stackoverflow.com/questions/21112707/check-if-a-string-matches-a-regex-in-bash-script
[[ "$RELEASE_VERSION" =~ ^(0|[1-9]\d*)\.(0|[1-9]\d*)\.(0|[1-9]\d*)(-((0|[1-9]\d*|\d*[a-zA-Z-][0-9a-zA-Z-]*)(\.(0|[1-9]\d*|\d*[a-zA-Z-][0-9a-zA-Z-]*))*))?(\+([0-9a-zA-Z-]+(\.[0-9a-zA-Z-]+)*))?$ ]]
compile-rml:
if: ${{ inputs.release-rml }}
uses: ./.github/workflows/build-rml.yml
needs: check-inputs
with:
RELEASE_VERSION: "${{ inputs.version }}"
RELEASE_NOTES: "${{ inputs.description }}"
Expand All @@ -44,6 +56,7 @@ jobs:
compile-monkey:
if: ${{ inputs.release-monkey }}
uses: ./.github/workflows/build-monkey.yml
needs: check-inputs
with:
RELEASE_VERSION: "${{ inputs.version }}"
RELEASE_NOTES: "${{ inputs.description }}"
Expand Down
2 changes: 1 addition & 1 deletion SampleMod.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
<Product>SampleMod</Product>
<Description>A sample Resonite Mod</Description>
<Copyright>CC0</Copyright>
<Version>1.0.4</Version>
<Version>1.1.0</Version>
<PackageProjectUrl>$(PROJECT_URL)</PackageProjectUrl>
<PackageReleaseNotes>$(RELEASE_NOTES)</PackageReleaseNotes>
<PackageTags>Resonite</PackageTags>
Expand Down
2 changes: 1 addition & 1 deletion SampleModRML.cs
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ public class SampleModRML : ResoniteMod, ISampleMod
{
public override string Name => "SampleMod";
public override string Author => "mpmxyz";
public override string Version => "1.0.4"; //Version of the mod, should match the AssemblyVersion
public override string Version => "1.1.0"; //Version of the mod, should match the AssemblyVersion
public override string Link => "https://github.com/mpmxyz/ResoniteSampleMod";


Expand Down

0 comments on commit 72fe474

Please sign in to comment.