44 push :
55 branches :
66 - ' release'
7-
7+
88jobs :
99 create-release :
1010 name : Create release
1111 runs-on : ubuntu-latest
12- outputs :
12+ outputs :
1313 determined_version : ${{ steps.version_step.outputs.majorMinorPatch }}
14+ publish_version : ${{ steps.version_step.outputs.publishVersion }}
1415 steps :
1516 - name : Checkout
1617 uses : actions/checkout@v4
@@ -19,10 +20,13 @@ jobs:
1920 - name : Setup .NET
2021 uses : actions/setup-dotnet@v4
2122 with :
22- dotnet-version : 7.0.x
23+ dotnet-version : 7.0.x
2324 - name : Determine Version
2425 id : version_step
25- run : echo "majorMinorPatch=$( git describe --tags --abbrev=0 )" >> $GITHUB_OUTPUT
26+ run : |
27+ tag=$( git describe --tags --abbrev=0 )
28+ echo "majorMinorPatch=$tag" >> $GITHUB_OUTPUT
29+ echo "publishVersion=${tag:1}" >> $GITHUB_OUTPUT
2630 - name : Setup GitReleaseManager
2731 uses :
gittools/actions/gitreleasemanager/[email protected] 2832 with :
4347 determined_version : ${{ needs.create-release.outputs.determined_version }}
4448 strategy :
4549 matrix :
46- config :
50+ config :
4751 - os : ubuntu-latest
4852 rid : linux-x64
4953 - os : macos-latest
6670 versionSpec : ' 0.18.x'
6771 - name : Publish
6872 run : |
69- tag=${{ needs.create-release.outputs.determined_version }}
7073 mkdir output
71- dotnet publish ./src/HydraScript/HydraScript.csproj -c Release -r ${{ matrix.config.rid }} -p:PublishSingleFile=true -p:DebugType=embedded -p:Version=${tag:1 } --self-contained false -o ./output
74+ dotnet publish ./src/HydraScript/HydraScript.csproj -c Release -r ${{ matrix.config.rid }} -p:PublishSingleFile=true -p:DebugType=embedded -p:Version=${{ needs.create-release.outputs.publish_version } } --self-contained false -o ./output
7275 - name : Rename Executable
7376 run : mv ./output/HydraScript${{ matrix.config.rid == 'win-x64' && '.exe' || '' }} ./output/hydrascript_${{ matrix.config.rid }}${{ matrix.config.rid == 'win-x64' && '.exe' || '' }}
7477 - name : Add asset to a release with GitReleaseManager
9396 uses :
gittools/actions/gitreleasemanager/[email protected] 9497 with :
9598 versionSpec : ' 0.18.x'
96- - name : Publish release with GitReleaseManager
99+ - name : Publish release with GitReleaseManager
97100 uses :
gittools/actions/gitreleasemanager/[email protected] 98101 with :
99102 token : ${{ secrets.GITHUB_TOKEN }}
0 commit comments