|
5 | 5 | branches: [ main ] |
6 | 6 | pull_request: |
7 | 7 | branches: [ main ] |
| 8 | + workflow_dispatch: |
| 9 | + inputs: |
| 10 | + branch: |
| 11 | + description: "The branch to a release to" |
| 12 | + required: true |
| 13 | + |
| 14 | +env: |
| 15 | + TOOL_PROJ_PATH: ./src/ModVerify.CliApp/ModVerify.CliApp.csproj |
| 16 | + CREATOR_PROJ_PATH: ./Modules/ModdingToolBase/src/AnakinApps/ApplicationManifestCreator/ApplicationManifestCreator.csproj |
| 17 | + UPLOADER_PROJ_PATH: ./Modules/ModdingToolBase/src/AnakinApps/FtpUploader/FtpUploader.csproj |
| 18 | + TOOL_EXE: ModVerify.exe |
| 19 | + UPDATER_EXE: AnakinRaW.ExternalUpdater.exe |
| 20 | + MANIFEST_CREATOR: AnakinRaW.ApplicationManifestCreator.dll |
| 21 | + SFTP_UPLOADER: AnakinRaW.FtpUploader.dll |
| 22 | + ORIGIN_BASE: https://republicatwar.com/downloads/ModVerify |
| 23 | + ORIGIN_BASE_PART: downloads/ModVerify/ |
| 24 | + BRANCH_NAME: ${{ github.event.inputs.branch || 'stable' }} |
8 | 25 |
|
9 | 26 | jobs: |
10 | 27 |
|
|
25 | 42 | - name: Setup .NET |
26 | 43 | uses: actions/setup-dotnet@v4 |
27 | 44 | - name: Create NetFramework Release |
28 | | - run: dotnet publish .\src\ModVerify.CliApp\ModVerify.CliApp.csproj --configuration Release -f net48 --output ./releases/net48 /p:DebugType=None /p:DebugSymbols=false |
| 45 | + run: dotnet publish ${{ env.TOOL_PROJ_PATH }} --configuration Release -f net48 --output ./releases/net48 /p:DebugType=None /p:DebugSymbols=false |
29 | 46 | - name: Create Net Core Release |
30 | | - run: dotnet publish .\src\ModVerify.CliApp\ModVerify.CliApp.csproj --configuration Release -f net9.0 --output ./releases/net9.0 /p:DebugType=None /p:DebugSymbols=false |
| 47 | + run: dotnet publish ${{ env.TOOL_PROJ_PATH }} --configuration Release -f net9.0 --output ./releases/net9.0 /p:DebugType=None /p:DebugSymbols=false |
31 | 48 | - name: Upload a Build Artifact |
32 | 49 | uses: actions/upload-artifact@v4 |
33 | 50 | with: |
|
38 | 55 |
|
39 | 56 | deploy: |
40 | 57 | name: Deploy |
| 58 | + # Deploy on push to main or manual trigger |
41 | 59 | if: | |
42 | | - github.ref == 'refs/heads/main' && github.event_name == 'push' |
| 60 | + (github.ref == 'refs/heads/main' && github.event_name == 'push') || github.event_name == 'workflow_dispatch' |
43 | 61 | needs: [pack] |
44 | 62 | runs-on: ubuntu-latest |
45 | 63 | steps: |
|
58 | 76 | - uses: dotnet/nbgv@v0.4.2 |
59 | 77 | id: nbgv |
60 | 78 | - name: Create GitHub release |
| 79 | + # Create a GitHub release on push to main only |
| 80 | + if: | |
| 81 | + github.ref == 'refs/heads/main' && github.event_name == 'push' |
61 | 82 | uses: softprops/action-gh-release@v2 |
62 | 83 | with: |
63 | 84 | name: v${{ steps.nbgv.outputs.SemVer2 }} |
|
0 commit comments