|
22 | 22 | steps: |
23 | 23 | - name: Checkout |
24 | 24 | uses: actions/checkout@v4 |
| 25 | + with: |
| 26 | + fetch-depth: 0 |
25 | 27 |
|
26 | 28 | - name: Verify Steam credentials |
27 | 29 | shell: bash |
|
42 | 44 | steam-user: ${{ secrets.STEAMUSER }} |
43 | 45 | steam-password: ${{ secrets.STEAMPASS }} |
44 | 46 |
|
| 47 | + - name: Setup .NET SDK |
| 48 | + uses: actions/setup-dotnet@v4 |
| 49 | + with: |
| 50 | + dotnet-version: 9.0.x |
| 51 | + |
45 | 52 | - name: Cache NuGet packages |
46 | 53 | uses: actions/cache@v4 |
47 | 54 | with: |
|
73 | 80 | run: | |
74 | 81 | dotnet test ReferenceReplacement.sln --configuration Release --no-build \ |
75 | 82 | -p:ResoniteAssembliesDir="${{ steps.resonite.outputs.resonite-path }}" |
| 83 | +
|
| 84 | + - name: Prepare release assets |
| 85 | + if: startsWith(github.ref, 'refs/tags/v') |
| 86 | + shell: bash |
| 87 | + run: | |
| 88 | + set -euo pipefail |
| 89 | + artifacts_dir=release-artifacts |
| 90 | + mkdir -p "$artifacts_dir" |
| 91 | + cp src/ReferenceReplacement/bin/Release/net9.0/ReferenceReplacement.dll "$artifacts_dir/ReferenceReplacement.dll" |
| 92 | + if [ -f src/ReferenceReplacement/bin/Release/net9.0/ReferenceReplacement.pdb ]; then |
| 93 | + cp src/ReferenceReplacement/bin/Release/net9.0/ReferenceReplacement.pdb "$artifacts_dir/ReferenceReplacement.pdb" |
| 94 | + fi |
| 95 | +
|
| 96 | + - name: Upload release artifacts |
| 97 | + if: startsWith(github.ref, 'refs/tags/v') |
| 98 | + uses: actions/upload-artifact@v4 |
| 99 | + with: |
| 100 | + name: reference-replacement |
| 101 | + path: release-artifacts |
| 102 | + if-no-files-found: error |
| 103 | + |
| 104 | + release: |
| 105 | + runs-on: ubuntu-latest |
| 106 | + needs: build |
| 107 | + if: startsWith(github.ref, 'refs/tags/v') |
| 108 | + permissions: |
| 109 | + contents: write |
| 110 | + steps: |
| 111 | + - name: Download build artifacts |
| 112 | + uses: actions/download-artifact@v4 |
| 113 | + with: |
| 114 | + name: reference-replacement |
| 115 | + path: release-artifacts |
| 116 | + |
| 117 | + - name: Publish GitHub release |
| 118 | + uses: softprops/action-gh-release@v2 |
| 119 | + with: |
| 120 | + tag_name: ${{ github.ref_name }} |
| 121 | + name: Reference Replacement ${{ github.ref_name }} |
| 122 | + generate_release_notes: true |
| 123 | + files: | |
| 124 | + release-artifacts/ReferenceReplacement.dll |
| 125 | + release-artifacts/ReferenceReplacement.pdb |
0 commit comments