-
Notifications
You must be signed in to change notification settings - Fork 12
59 lines (50 loc) · 1.49 KB
/
build.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
name: dotnet package
on:
push:
branches:
- master
jobs:
build:
runs-on: ubuntu-latest
strategy:
matrix:
rid: ['win-x64', 'linux-x64', 'osx-x64']
steps:
- name: Variables
id: vars
run: echo sha_short=${GITHUB_SHA::7} >> $GITHUB_OUTPUT
- uses: actions/checkout@v3
with:
submodules: recursive
- name: Setup .NET Core SDK 6.x
uses: actions/setup-dotnet@v3
with:
dotnet-version: '6.x'
- name: Install dependencies
run: dotnet restore
- name: Build
run: dotnet publish --sc false -r ${{ matrix.rid }} -c release -o ${{ matrix.rid }} -p:PublishSingleFile=true
- uses: actions/upload-artifact@v3
with:
name: ${{ github.event.repository.name }}-${{ steps.vars.outputs.sha_short }}-${{ matrix.rid }}
path: ${{ matrix.rid }}
release:
runs-on: ubuntu-latest
needs: [build]
steps:
- name: Variables
id: vars
run: echo sha_short=${GITHUB_SHA::7} >> $GITHUB_OUTPUT
- uses: actions/download-artifact@v3
with:
path: artifacts
- run: for a in *; do zip -r "$a.zip" "$a"; done
working-directory: artifacts
- uses: "marvinpinto/action-automatic-releases@latest"
with:
repo_token: "${{ secrets.GITHUB_TOKEN }}"
automatic_release_tag: "latest"
prerelease: true
title: "Development Build"
files: |
artifacts/*.zip