-
Notifications
You must be signed in to change notification settings - Fork 2
64 lines (48 loc) · 1.72 KB
/
dotnetPublish.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
64
name: .NET
on:
push:
tags:
- '*'
permissions:
contents: write
jobs:
release:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v2
- name: Get the version
id: get_version
run: echo ::set-output name=VERSION::$(jq -r .version package.json)
- name: Set Release Name
id: set_release_name
run: echo "RELEASE_NAME=$(echo ${GITHUB_REF#refs/tags/})" >> $GITHUB_ENV
- name: Setup .NET
uses: actions/setup-dotnet@v2
with:
dotnet-version: 7.x # Replace with the desired .NET version
- name: Restore dependencies
run: dotnet restore ./PLCsimAdvanced_Manager/PLCsimAdvanced_Manager.csproj
- name: Publish
run: dotnet publish -c Release -o PLCsimAdvanced_manager --self-contained true -p:PublishSingleFile=true -p:Version=${{ steps.get_version.outputs.VERSION }} -p:DebugType=None
- name: Archive Release
uses: thedoctor0/[email protected]
with:
type: 'zip'
filename: 'PLCsimAdvanced_manager.zip'
path: './PLCsimAdvanced_manager/'
- name: Extract release notes
id: extract-release-notes
uses: ffurrer2/extract-release-notes@v1
- name: Create release body file
uses: ultram4rine/extract-changes-action@v1
with:
changelog: CHANGELOG.md
version: ${{ steps.get_version.outputs.VERSION }}
output: changes.txt
- name: Create Release
id: create_release
uses: softprops/action-gh-release@v1
with:
files: PLCsimAdvanced_manager.zip
body: ${{ steps.extract-release-notes.outputs.release_notes }}