-
Notifications
You must be signed in to change notification settings - Fork 0
43 lines (39 loc) · 1.34 KB
/
dotnet-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
39
40
41
42
43
name: 'Build and Release'
on:
push:
tags:
- 'v*.*.*'
jobs:
build-windows:
runs-on: windows-latest
steps:
- uses: actions/checkout@v4
- name: Setup .NET 8.0
uses: actions/setup-dotnet@v4
with:
dotnet-version: 8.0.x
- name: Restore dependencies
working-directory: ./src
run: dotnet restore
- name: Build
working-directory: ./src
run: dotnet build --configuration Release --no-restore /p:NoWarn=1591
- name: Build project
run: |
dotnet publish ./src/Nager.FineDustSensor.SensorControl/Nager.FineDustSensor.SensorControl.csproj --configuration Release --self-contained false --runtime win-x64 -p:PublishReadyToRun=true -p:PublishSingleFile=true --output ./publish/temp
- uses: vimtor/[email protected]
with:
files: ./publish/temp
dest: ./publish/Nager.FineDustSensor.SensorControl.zip
- name: Get the version
id: get_version
run: echo ::set-output name=tag::${GITHUB_REF/refs\/tags\//}
shell: bash
- name: Upload binaries to release
uses: svenstaro/upload-release-action@v2
with:
repo_name: nager/Nager.FineDustSensor
repo_token: ${{ secrets.GITHUB_TOKEN }}
file: ./publish/Nager.FineDustSensor.SensorControl.zip
tag: ${{ steps.get_version.outputs.tag }}
overwrite: true