-
Notifications
You must be signed in to change notification settings - Fork 0
63 lines (51 loc) · 1.99 KB
/
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
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
name: Release
on:
workflow_dispatch:
inputs:
versionNumber:
description: 'Version number'
required: true
jobs:
build:
name: Build release
runs-on: windows-latest
steps:
- uses: actions/checkout@v2
- name: Setup .NET Core
uses: actions/setup-dotnet@v1
with:
dotnet-version: 7.0.x
- name: Install dependencies
run: dotnet restore
- name: Build
run: dotnet build --configuration Release --no-restore
- name: Publish
run: dotnet publish ./KansasPPDMLoaderConsole/KansasPPDMLoaderConsole.csproj -c Release --self-contained true -r win-x64 -p:PublishSingleFile=true
- name: View content
run: dir D:\a\KansasPPDMLoader\KansasPPDMLoader\KansasPPDMLoaderConsole\bin\Release\net7.0\win-x64\publish\
- name: Upload KansasPPDMLoader Build Artifact
uses: actions/upload-artifact@v2
with:
name: KansasPPDMLoader
path: D:\a\KansasPPDMLoader\KansasPPDMLoader\KansasPPDMLoaderConsole\bin\Release\net7.0\win-x64\publish\KansasPPDMLoader.exe
- name: Create release
id: create-new-release
uses: actions/create-release@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
tag_name: v${{ github.event.inputs.versionNumber }}
release_name: Release V${{ github.event.inputs.versionNumber }}
- name: Download site content KansasPPDMLoader
uses: actions/download-artifact@v2
with:
name: KansasPPDMLoader
- name: Upload KansasPPDMLoader release asset
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ steps.create-new-release.outputs.upload_url }}
asset_path: ./KansasPPDMLoader.exe
asset_name: KansasPPDMLoader.exe
asset_content_type: application/octet-stream