forked from maforget/ComicRackCE
-
Notifications
You must be signed in to change notification settings - Fork 0
61 lines (49 loc) · 1.88 KB
/
release.yml
File metadata and controls
61 lines (49 loc) · 1.88 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
# This workflow will build a .NET project
# For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-net
name: Release
on:
workflow_dispatch:
inputs:
version:
description: 'Version'
required: true
type: string
default: 'X.Y{.Z}'
jobs:
build:
runs-on: windows-2022
steps:
- name: Checkout
uses: actions/checkout@v4
with:
submodules: recursive
- name: setup-msbuild
uses: microsoft/setup-msbuild@v2
- name: Setup NuGet
uses: NuGet/setup-nuget@v2
- name: Restore Packages
run: nuget restore ComicRack.sln
- name: Build solution
run: msbuild ComicRack\ComicRack.csproj -t:rebuild -property:Configuration=Release
- name: Package Files
run: powershell Compress-Archive -Path 'ComicRack\bin\Release\net48\*' -DestinationPath 'ComicRackCE_v${{ github.event.inputs.version }}.zip' -Force
- name: Download VC++ Redistributable (x64)
run: |
mkdir ComicRack\bin\Release\net48\_CommonRedist
curl -L -o ComicRack\bin\Release\net48\_CommonRedist\vc_redist.x64.exe https://aka.ms/vs/17/release/vc_redist.x64.exe
- name: Compile installer
uses: Minionguyjpro/Inno-Setup-Action@v1.2.4
with:
path: Installer.iss
options: /DMyAppVersion=v${{ github.event.inputs.version }} /DMyAppSetupFile=ComicRackCESetup_v${{ github.event.inputs.version }}
- name: Release
uses: ncipollo/release-action@main
with:
token: ${{ secrets.GITHUB_TOKEN }}
allowUpdates: false
artifactErrorsFailBuild: true
draft: true
prerelease: false
commit: ${{ github.ref_name }}
tag: 'v${{ github.event.inputs.version }}'
artifacts: 'ComicRackCE_v${{ github.event.inputs.version }}.zip,ComicRackCESetup_v${{ github.event.inputs.version }}.exe'