-
Notifications
You must be signed in to change notification settings - Fork 1
38 lines (33 loc) · 1.22 KB
/
release.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
# .github/workflows/release.yml
on:
release:
types: [created]
env:
PROJECT_NAME: SnipSnip
ASSEMBLY_NAME: snip-snip
jobs:
build:
runs-on: windows-latest # For a list of available runner types, refer to
# https://help.github.com/en/actions/reference/workflow-syntax-for-github-actions#jobsjob_idruns-on
strategy:
fail-fast: false
matrix:
rid: [win-x64, linux-x64, osx-x64]
steps:
- name: Install .NET Core
uses: actions/setup-dotnet@v3
with:
dotnet-version: 8.0.x
- name: Checkout
uses: actions/checkout@v4
- name: Build
run: dotnet build ${{env.PROJECT_NAME}} -c Release
- name: Publish
run: dotnet publish ${{env.PROJECT_NAME}} -c Release -p:PublishSingleFile=true -p:IncludeNativeLibrariesForSelfExtract=true -p:DebugType=None -p:DebugSymbols=false -o publish -r ${{matrix.rid}} --self-contained=false
- name: Zip files
run: 7z a -tzip ${{env.ASSEMBLY_NAME}}-${{matrix.rid}}.zip ./Publish/* README.md LICENSE
- name: Upload to release
uses: softprops/action-gh-release@v1
if: ${{startsWith(github.ref, 'refs/tags/') }}
with:
files: ${{env.ASSEMBLY_NAME}}-${{matrix.rid}}.zip