-
Notifications
You must be signed in to change notification settings - Fork 1
76 lines (64 loc) · 2.28 KB
/
dotnet.yml
File metadata and controls
76 lines (64 loc) · 2.28 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
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
name: .NET
on:
push:
tags:
- 'v*'
jobs:
build:
runs-on: windows-latest
steps:
- uses: actions/checkout@v2
- name: Setup .NET
uses: actions/setup-dotnet@v1
with:
dotnet-version: 6.0.x
- name: Restore dependencies
run: dotnet restore
- name: Build
run: dotnet build -c Release --no-restore
- name: Test
run: dotnet test -c Release --no-build --verbosity normal
- name: Publish
run: |
mkdir blocks
dotnet publish ./App/App.csproj -c Release -o blocks/win-x64 -r win-x64 --self-contained true /p:PublishReadyToRun=true /p:PublishSingleFile=true /p:IncludeNativeLibrariesForSelfExtract=true
dotnet publish ./App/App.csproj -c Release -o blocks/win-x86 -r win-x86 --self-contained true /p:PublishReadyToRun=true /p:PublishSingleFile=true /p:IncludeNativeLibrariesForSelfExtract=true
- name: zip win artifact
run: |
powershell Compress-Archive -Path ./blocks/win-x64/* -DestinationPath ./blocks-win_x64.zip
powershell Compress-Archive -Path ./blocks/win-x86/* -DestinationPath ./blocks-win_x86.zip
#- name: Upload build artifacts
# uses: actions/upload-artifact@v2
# with:
# name: Windows
# path: ./blocks/*
- name: Create Release
id: create_release
uses: actions/create-release@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
release_name: Release ${{ github.ref }}
tag_name: ${{ github.ref }}
body: |
Initial Release
draft: false
prerelease: false
- name: Upload Windows x64 Artifact
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ github.token }}
with:
upload_url: ${{ steps.create_release.outputs.upload_url }}
asset_path: ./blocks-win_x64.zip
asset_name: blocks-win_x64.zip
asset_content_type: application/zip
- name: Upload Windows x86 Artifact
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ github.token }}
with:
upload_url: ${{ steps.create_release.outputs.upload_url }}
asset_path: ./blocks-win_x86.zip
asset_name: blocks-win_x86.zip
asset_content_type: application/zip