@@ -18,12 +18,15 @@ jobs:
1818 with :
1919 fetch-depth : 0 # fetch-depth is needed for GitVersion
2020
21+ - name : Set version variable
22+ run : echo "VERSION=${{ inputs.rel_version }}" >> $GITHUB_ENV # Extract version from the tag
23+
2124 - name : Create Branch
2225 uses : peterjgrainger/action-create-branch@v2.2.0
2326 env :
2427 GITHUB_TOKEN : ${{ secrets.GH_TOKEN }}
2528 with :
26- branch : ' release-${{ inputs.rel_version }}'
29+ branch : ' release-${{ env.VERSION }}'
2730 sha : ' ${{ github.event.pull_request.head.sha }}'
2831
2932 - name : Setup .NET
@@ -33,28 +36,29 @@ jobs:
3336
3437 - name : Restore dependencies
3538 run : dotnet restore
36-
39+
3740 - name : Build
38- run : dotnet build --configuration Release /p:Version='${{ inputs.rel_version }}' --no-restore
41+ run : dotnet build --configuration Release /p:Version='${{ env.VERSION }}' --no-restore
3942
4043 - name : Test
41- run : dotnet test --configuration Release /p:Version='${{ inputs.rel_version }}' --no-build
44+ run : dotnet test --configuration Release /p:Version='${{ env.VERSION }}' --no-build
4245
4346 - name : Publish project
44- run : dotnet publish -c Release -o publish_output
47+ run : dotnet publish -c Release -o ./publish
4548
4649 - name : Zip release and calculate SHA256 checksum
4750 run : |
48- cd publish_output
49- release_name="release-${{ inputs.rel_version }}"
50- zip -r ${release_name}.zip .
51- sha256sum ${release_name}.zip > ${release_name}.zip.sha256
51+ mkdir -p dist
52+ zip -r "dist/release-${{ env.VERSION }}.zip" ./publish
53+ sha256sum dist/release-${{ env.VERSION }}.zip > dist/release-${{ env.VERSION }}.zip.sha256
5254
5355 - name : Create GitHub Release and Upload Artifacts
5456 uses : ncipollo/release-action@v1
5557 with :
56- tag : v${{ inputs.rel_version }}
57- name : Amazon S3 Plugin v${{ inputs.rel_version }}
58- artifacts : release-${{ inputs.rel_version }}.zip, release-${{ inputs.rel_version }}.zip.sha256
59- body : " This is the v${{ inputs.rel_version }} release of Amazon S3 Storage for FlowSynx System."
58+ tag : v${{ env.VERSION }}
59+ name : Amazon S3 Plugin v${{ env.VERSION }}
60+ artifacts : |
61+ "dist/release-${{ env.VERSION }}.zip"
62+ "dist/release-${{ env.VERSION }}.zip.sha256"
63+ body : " This is the v${{ env.VERSION }} release of Amazon S3 Storage for FlowSynx System."
6064 token : ${{ secrets.GH_TOKEN }}
0 commit comments