-
Notifications
You must be signed in to change notification settings - Fork 0
80 lines (70 loc) · 2.16 KB
/
Copy pathrelease.yml
File metadata and controls
80 lines (70 loc) · 2.16 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
76
77
78
79
80
name: Release
on:
workflow_dispatch:
inputs:
version:
description: Semantic version bump for the release
required: true
default: patch
type: choice
options:
- patch
- minor
- major
runtime:
description: Windows release target(s)
required: true
default: win-x86
type: choice
options:
- both
- win-x64
- win-x86
permissions:
contents: write
pull-requests: write
jobs:
release:
runs-on: windows-latest
steps:
# - name: Check out source
# uses: actions/checkout@v4
# with:
# fetch-depth: 0
# - name: Set up .NET 8
# uses: actions/setup-dotnet@v4
# with:
# dotnet-version: 8.0.x
# - name: Install .NET Framework 4.5.2 Developer Pack
# shell: pwsh
# run: |
# $installer = Join-Path $env:TEMP 'netfx452-devpack.exe'
# Invoke-WebRequest `
# -Uri 'https://go.microsoft.com/fwlink/?clcid=0x409&linkid=397673' `
# -OutFile $installer
# $process = Start-Process `
# -FilePath $installer `
# -ArgumentList '/q', '/norestart' `
# -Wait `
# -PassThru
# if ($process.ExitCode -notin 0, 3010) {
# throw "Developer Pack installation failed: $($process.ExitCode)"
# }
- name: Create GitHub release
uses: hsayed21/release-action@v1
with:
version: ${{ inputs.version }}
initial-version: '1.0.2'
generate-changelog: true
release-command-shell: pwsh
release-command: |
if ('${{ inputs.runtime }}' -eq 'both') {
./scripts/New-ReleaseZip.ps1 -Version $env:RELEASE_VERSION -Runtime win-x64
./scripts/New-ReleaseZip.ps1 -Version $env:RELEASE_VERSION -Runtime win-x86
}
else {
./scripts/New-ReleaseZip.ps1 -Version $env:RELEASE_VERSION -Runtime "${{ inputs.runtime }}"
}
files-pattern: artifacts/*.zip
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}