File tree Expand file tree Collapse file tree 1 file changed +56
-0
lines changed
Expand file tree Collapse file tree 1 file changed +56
-0
lines changed Original file line number Diff line number Diff line change 1+ name : Publish-Release-To-Artifacts
2+
3+ on :
4+ release :
5+ types : [published]
6+
7+ jobs :
8+ release :
9+ name : Release
10+ strategy :
11+ matrix :
12+ kind : ['linux', 'windows', 'macOS']
13+ include :
14+ - kind : linux
15+ os : ubuntu-latest
16+ target : linux-x64
17+ - kind : windows
18+ os : windows-latest
19+ target : win-x64
20+ - kind : macOS
21+ os : macos-latest
22+ target : osx-x64
23+ runs-on : ${{ matrix.os }}
24+ steps :
25+ - name : Checkout
26+ uses : actions/checkout@v1
27+
28+ - name : Setup dotnet
29+ uses : actions/setup-dotnet@v3.2.0
30+
31+ - name : Build
32+ shell : bash
33+ run : |
34+ tag=$(git describe --tags --abbrev=0)
35+ release_name="SharpFM.App-$tag-${{ matrix.target }}"
36+
37+ # Build everything
38+ dotnet publish SharpFM.App/SharpFM.App.csproj --runtime "${{ matrix.target }}" -c Release -o "$release_name"
39+
40+ # Pack files
41+ if [ "${{ matrix.target }}" == "win-x64" ]; then
42+ # Pack to zip for Windows
43+ 7z a -tzip "${release_name}.zip" "./${release_name}/*"
44+ else
45+ tar czvf "${release_name}.tar.gz" "$release_name"
46+ fi
47+
48+ # Delete output directory
49+ rm -r "$release_name"
50+
51+ - name : Publish
52+ uses : softprops/action-gh-release@v1
53+ with :
54+ files : " SharpFM.App*"
55+ env :
56+ GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
You can’t perform that action at this time.
0 commit comments