1- name : Build artifacts
1+
2+ name : Publish
23
34on :
45 push :
5- branches : [ "master" ]
6- pull_request :
7- branches : [ "master" ]
8- workflow_dispatch :
9- inputs :
10- build_target :
11- description : " Target branch or tag to build"
12- required : false
13- default : " master"
6+ tags :
7+ - ' *'
148
159env :
1610 SOLUTION_FILE_PATH : .
@@ -28,38 +22,30 @@ jobs:
2822
2923 steps :
3024 - uses : actions/checkout@v4
31- with :
32- fetch-depth : 0
3325
3426 - name : Decide version
3527 shell : bash
36- run : |
37- LATEST_TAG=$(git describe --tags --abbrev=0)
38- CURRENT_SHA=$(git rev-parse --short HEAD)
39- if [[ $(git rev-list $LATEST_TAG..HEAD --count) -gt 0 ]]; then
40- VERSION="${LATEST_TAG}-${CURRENT_SHA}"
41- else
42- VERSION="${LATEST_TAG}"
43- fi
44- echo "VERSION=$VERSION" >> $GITHUB_ENV
28+ run : echo "VERSION=${GITHUB_REF##*/}" >> $GITHUB_ENV
4529
4630 - name : Get Repository Contributors
4731 shell : bash
4832 run : |
4933 CONTRIBUTORS=$(curl "https://api.github.com/repos/${{ github.repository }}/contributors?per_page=100" | jq -r '.[].login' | paste -sd, -)
5034 echo "CONTRIBUTORS=$CONTRIBUTORS" >> $GITHUB_ENV
51-
35+
5236 - name : Add MSBuild to PATH
5337 uses : microsoft/setup-msbuild@v1.0.2
5438
5539 - name : Build
5640 working-directory : ${{env.GITHUB_WORKSPACE}}
5741 run : msbuild /m /p:Configuration=${{env.BUILD_CONFIGURATION}} /p:PluginVersion="${{env.VERSION}}" /p:Contributors="${{env.CONTRIBUTORS}}" ${{env.SOLUTION_FILE_PATH}} /p:Platform=${{env.PLATFORM}}
5842
59- - name : Upload Build Artifacts
60- uses : actions/upload-artifact@v4
43+ - name : Zip the build artifacts
44+ run : |
45+ powershell -Command Compress-Archive -Path "Release\*.json","Release\*.dll" -DestinationPath ILS_Window_Plugin-${{ env.VERSION }}.zip
46+
47+ - name : Upload binaries to release
48+ uses : svenstaro/upload-release-action@v2
6149 with :
62- name : ILS_Window_Plugin-${{ env.VERSION }}
63- path : |
64- Release/*.dll
65- Release/*.json
50+ file : ILS_Window_Plugin-${{ env.VERSION }}.zip
51+ tag : ${{ github.ref }}
0 commit comments