-
Notifications
You must be signed in to change notification settings - Fork 8
73 lines (58 loc) · 2.26 KB
/
Copy pathrelease.yml
File metadata and controls
73 lines (58 loc) · 2.26 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
# This is a basic workflow to help you get started with Actions
name: Publish
# Controls when the workflow will run
on:
# Triggers the workflow on push or pull request events but only for the "master" branch
push:
tags: [ "v*.*.*" ]
# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:
jobs:
build:
permissions:
contents: write
runs-on: windows-latest # For a list of available runner types, refer to
# https://help.github.com/en/actions/reference/workflow-syntax-for-github-actions#jobsjob_idruns-on
env:
Solution_Name: Nano11Toolkit.sln # Replace with your solution name, i.e. MyWpfApp.sln
Project_Name: Nano11Toolkit/Nano11Toolkit.csproj
steps:
- name: Checkout
uses: actions/checkout@v3
with:
fetch-depth: 0
# Install the .NET Core workload
- name: Install .NET Core
uses: actions/setup-dotnet@v3
with:
dotnet-version: 8.0.x
# Add MSBuild to the PATH: https://github.com/microsoft/setup-msbuild
- name: Setup MSBuild.exe
uses: microsoft/setup-msbuild@v1.0.2
# Restore the application to populate the obj folder with RuntimeIdentifiers
- name: Restore the application
run: msbuild $env:Solution_Name /t:Restore /p:Configuration=Release
- name: Build
run: |
echo ${{ github.ref_name }} > Nano11Toolkit/Version.txt
msbuild $env:Project_Name /p:Configuration=Release
# Upload the MSIX package: https://github.com/marketplace/actions/upload-a-build-artifact
- name: Upload build artifacts
uses: actions/upload-artifact@v4
with:
name: Release-${{ github.ref_name }}
path: "Nano11Toolkit/bin/Release/net8.0-windows/*"
- name: ZIPs the contents
uses: TheDoctor0/zip-release@0.7.1
with:
directory: "Nano11Toolkit/bin/Release/net8.0-windows/"
filename: Release.zip
- name: List
run: dir -Recurse
- name: Create Relese
uses: ncipollo/release-action@v1.10.0
with:
artifacts: "Nano11Toolkit/bin/Release/net8.0-windows/Release.zip"
tag: "${{ github.ref_name }}"
name: "${{ github.ref_name }}"
bodyFile: "README.md"