Repository navigation
67 lines (56 loc) · 2.28 KB
/
Copy pathrelease.yml
File metadata and controls
67 lines (56 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
name: Release
on:
push:
tags:
- 'v*'
workflow_dispatch:
inputs:
tag_name:
description: 'Release Tag (e.g. v1.0.0)'
required: true
default: 'v1.0.0'
jobs:
publish-and-release:
name: Create GitHub Release
runs-on: windows-latest
permissions:
contents: write
steps:
- name: Checkout repository
uses: actions/checkout@v4
with:
submodules: recursive
- name: Setup .NET SDK
uses: actions/setup-dotnet@v4
with:
dotnet-version: '10.0.x'
- name: Restore dependencies
run: dotnet restore
- name: Build and Test
run: |
dotnet build --configuration Release --no-restore
dotnet test --configuration Release --no-build --verbosity normal
- name: Publish Framework-Dependent (win-x64)
run: dotnet publish src/DockAll/DockAll.csproj --configuration Release --runtime win-x64 --self-contained false -o ./dist/portable
- name: Publish Standalone Self-Contained (win-x64)
run: dotnet publish src/DockAll/DockAll.csproj --configuration Release --runtime win-x64 --self-contained true -p:PublishSingleFile=true -p:IncludeNativeLibrariesForSelfExtract=true -o ./dist/standalone
- name: Package Release Archives
shell: pwsh
run: |
New-Item -ItemType Directory -Force -Path ./artifacts
Compress-Archive -Path ./dist/portable/* -DestinationPath ./artifacts/DockAll-FrameworkDependent-win-x64.zip -Force
Compress-Archive -Path ./dist/standalone/* -DestinationPath ./artifacts/DockAll-Standalone-win-x64.zip -Force
# Generate SHA256 checksums
Get-FileHash ./artifacts/*.zip -Algorithm SHA256 | Format-List | Out-File ./artifacts/checksums.txt -Encoding utf8
- name: Create Release
uses: softprops/action-gh-release@v2
with:
tag_name: ${{ github.event.inputs.tag_name || github.ref_name }}
name: ${{ github.event.inputs.tag_name || github.ref_name }}
files: |
./artifacts/DockAll-FrameworkDependent-win-x64.zip
./artifacts/DockAll-Standalone-win-x64.zip
./artifacts/checksums.txt
generate_release_notes: true
draft: false
prerelease: false