1
+ name : Releasing ModVerify
2
+
3
+ on :
4
+ push :
5
+ branches : [ main ]
6
+ pull_request :
7
+ branches : [ main ]
8
+
9
+ jobs :
10
+
11
+ # Builds and tests the solution.
12
+ test :
13
+ uses : ./.github/workflows/test.yml
14
+
15
+ pack :
16
+ name : Pack
17
+ needs : [test]
18
+ runs-on : windows-latest
19
+ steps :
20
+ - name : Checkout sources
21
+ uses : actions/checkout@v4
22
+ with :
23
+ fetch-depth : 0
24
+ submodules : recursive
25
+ - name : Setup .NET
26
+ uses : actions/setup-dotnet@v4
27
+ - name : Create NetFramework Release
28
+ run : dotnet build .\src\ModVerify.CliApp\ModVerify.CliApp.csproj --configuration Release -f net48 --output ./releases/net48
29
+ - name : Create Net Core Release
30
+ run : dotnet build .\src\ModVerify.CliApp\ModVerify.CliApp.csproj --configuration Release -f net8.0 --output ./releases/net8.0
31
+ - name : Upload a Build Artifact
32
+ uses : actions/upload-artifact@v4
33
+ with :
34
+ name : Binary Releases
35
+ path : ./releases
36
+ if-no-files-found : error
37
+
38
+ deploy :
39
+ name : Deploy
40
+ if : |
41
+ github.ref == 'refs/heads/main' && github.event_name == 'push'
42
+ needs : [pack]
43
+ runs-on : ubuntu-latest
44
+ steps :
45
+ - name : Checkout sources
46
+ uses : actions/checkout@v4
47
+ with :
48
+ fetch-depth : 0
49
+ - uses : actions/download-artifact@v4
50
+ with :
51
+ name : Binary Releases
52
+ path : ./releases
53
+ - name : Create NET Core zip
54
+ # Change into the artifacts directory to avoid including the directory itself in the zip archive
55
+ working-directory : YoutubeDownloader/
56
+ run : zip -r ./releases/ModVerify-Net8.zip ./releases/net8.0
57
+
58
+ id : nbgv
59
+ - name : Create GitHub release
60
+ uses : softprops/action-gh-release@v2
61
+ with :
62
+ name : v${{ steps.nbgv.outputs.SemVer2 }}
63
+ tag_name : v${{ steps.nbgv.outputs.SemVer2 }}
64
+ token : ${{ secrets.GITHUB_TOKEN }}
65
+ generate_release_notes : true
66
+ files : |
67
+ ./releases/net48/ModVerify.CliApp.exe
68
+ ./releases/ModVerify-Net8.zip
0 commit comments