-
Notifications
You must be signed in to change notification settings - Fork 46
95 lines (80 loc) · 2.51 KB
/
dotnetcore.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
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
name: .NET Core
on:
push:
branches: master
jobs:
package:
name: Build
runs-on: ${{ matrix.os }}
strategy:
matrix:
include:
- name: Linux x64
os: ubuntu-latest
rid: linux-x64
artifact: 'Linux (x64)'
platform: 'Linux-x64'
- name: Linux Arm64
os: ubuntu-latest
rid: linux-arm64
artifact: 'Linux (ARM64)'
platform: 'Linux-arm64'
- name: MacOS x64
os: macos-latest
rid: osx-x64
artifact: 'MacOS (x64)'
platform: 'MacOS-x64'
- name: MacOS Arm64
os: macos-latest
rid: osx.12-arm64
artifact: 'MacOS Monterey (ARM64)'
platform: 'MacOS-arm64'
- name: Windows x64
os: windows-latest
rid: win-x64
artifact: 'Windows (x64)'
platform: 'Windows-x64'
- name: Windows Arm64
os: windows-latest
rid: win-arm64
artifact: 'Windows (ARM64)'
platform: 'Windows-arm64'
steps:
- uses: actions/checkout@v2
with:
submodules: 'recursive'
- name: Setup .NET Core
uses: actions/[email protected]
with:
dotnet-version: 6.0.x
- name: Get short SHA
id: vars
run: echo "::set-output name=sha_short::$(git rev-parse --short HEAD)"
- name: Build
run: dotnet publish --configuration Release -o "build" --version-suffix ${{steps.vars.outputs.sha_short}} -r ${{matrix.rid}} /p:PublishReadyToRun=false /p:TieredCompilation=false --self-contained
working-directory: src/Alex
#- name: Set executable permissions
# working-directory: src/Alex/build
# run: chmod +x Alex
- name: Zip Build
uses: thedoctor0/zip-release@master
with:
type: 'zip'
path: "src/Alex/build"
exclusions: '*.pdb'
filename: ./release.zip
- name: Create Release
uses: tix-factory/release-manager@v1
with:
github_token: ${{ secrets.github_token }}
mode: uploadReleaseAsset
filePath: ./release.zip
assetName: ${{ format('{0}.zip', matrix.platform) }}
tag: ${{ format('release-{0}', github.run_number) }}
- name: Upload artifact
uses: actions/[email protected]
with:
# Artifact name
name: ${{matrix.artifact}}
# Directory containing files to upload
path: ./release.zip