2626 - name : Install .NET dependencies
2727 run : dotnet restore
2828
29+ - name : Extract version from tag
30+ run : |
31+ # Extract the version from the tag (e.g., 'refs/tags/v1.2.3' -> '1.2.3')
32+ VERSION=${GITHUB_REF#refs/tags/v}
33+ echo "VERSION=$VERSION" >> $GITHUB_ENV
34+
2935 - name : Publish for ${{ matrix.runtime }}
30- run : dotnet publish -c Release -r ${{ matrix.runtime }} --no-restore
36+ run : dotnet publish -c Release -r ${{ matrix.runtime }} -p:Version=${{ env.VERSION }} -p:FileVersion=${{ env.VERSION }} -p:AssemblyName=CrossLaunch-${{ env.VERSION }} - -no-restore
3137
3238 - name : Test
3339 run : dotnet test -c Release --no-restore --no-build --verbosity normal --logger "trx;LogFileName=test-results.trx" --results-directory dist/tests --collect:"XPlat Code Coverage"
4955 - name : Lint
5056 run : dotnet csharpier --check .
5157
52- - name : Extract version from tag
53- run : |
54- # Extract the version from the tag (e.g., 'refs/tags/v1.2.3' -> '1.2.3')
55- VERSION=${GITHUB_REF#refs/tags/v}
56- echo "VERSION=$VERSION" >> $GITHUB_ENV
57-
5858 - name : Archive ${{ matrix.runtime }} artifacts
5959 shell : bash
6060 run : |
@@ -63,10 +63,10 @@ jobs:
6363
6464 if [[ "${{ matrix.runtime }}" == win-* ]]; then
6565 OUTPUT_FILE="CrossLaunch-${{ env.VERSION }}-${{ matrix.runtime }}.zip"
66- zip -r $OUTPUT_FILE $PUBLISH_DIR
66+ zip -rj $OUTPUT_FILE $PUBLISH_DIR
6767 else
6868 OUTPUT_FILE="CrossLaunch-${{ env.VERSION }}-${{ matrix.runtime }}.tar.gz"
69- tar -czvf $OUTPUT_FILE -C $PUBLISH_DIR
69+ tar -czvf $OUTPUT_FILE -C $PUBLISH_DIR .
7070 fi
7171
7272 echo "ARCHIVE_PATH=$(realpath $OUTPUT_FILE)" >> $GITHUB_ENV
0 commit comments