File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1+ name : Build and Release
2+
3+ on :
4+ push :
5+ tags :
6+ - ' v*.*.*' # Triggers on version tags
7+ branches :
8+ - ' **' # Triggers on all branches
9+
10+ jobs :
11+ build :
12+ runs-on : ubuntu-latest # Use a single runner
13+
14+ steps :
15+ - name : Checkout code
16+ uses : actions/checkout@v3
17+
18+ - name : Setup .NET Core
19+ uses : actions/setup-dotnet@v3
20+ with :
21+ dotnet-version : ' 8.0'
22+
23+ - name : Git Version
24+ id : version
25+ uses : codacy/git-version@2.5.4
26+
27+ - name : Build
28+ run : |
29+ dotnet publish --configuration Release --runtime win-x64 --no-self-contained --output publish/donut-windows-amd64 DoNut
30+ dotnet publish --configuration Release --runtime linux-x64 --no-self-contained --output publish/donut-linux-amd64 DoNut
31+ pushd publish/donut-windows-amd64
32+ zip -r -j ../donut-windows-amd64.zip *
33+ popd
34+ pushd publish/donut-linux-amd64
35+ zip -r ../donut-linux-amd64.zip *
36+ popd
37+
38+ - name : Create GitHub Release
39+ uses : softprops/action-gh-release@v1
40+ with :
41+ files : |
42+ publish/donut-linux-amd64.zip
43+ publish/donut-windows-amd64.zip
44+ tag_name : ${{ steps.version.outputs.version }}.${{ github.run_number }}
45+ env :
46+ GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
You can’t perform that action at this time.
0 commit comments