-
Notifications
You must be signed in to change notification settings - Fork 6
43 lines (39 loc) · 1.18 KB
/
Copy pathrelease.yml
File metadata and controls
43 lines (39 loc) · 1.18 KB
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
name: "Create Releases"
on:
release:
types: [published]
jobs:
release:
name: Release
strategy:
matrix:
kind: ['linux', 'windows']
include:
- kind: linux
os: ubuntu-latest
target: linux-x64
ext: ''
- kind: windows
os: windows-latest
target: win-x64
ext: '.exe'
runs-on: ${{ matrix.os }}
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Setup dotnet
uses: actions/setup-dotnet@v1
with:
dotnet-version: 8.0.x
- name: Build
shell: bash
run: |
release_name="TheSprayer-${{ matrix.target }}"
# Build everything
dotnet publish TheSprayer/TheSprayer.csproj --runtime "${{ matrix.target }}" -p:PublishTrimmed=true -c Release -p:PublishSingleFile=true -p:IncludeAllContentForSelfExtract=true --self-contained true -o "Release-${{ matrix.target }}"
- name: Publish
uses: softprops/action-gh-release@v0.1.5
with:
files: "Release-${{ matrix.target }}/*${{ matrix.ext }}"
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}