-
Notifications
You must be signed in to change notification settings - Fork 5
74 lines (60 loc) · 1.6 KB
/
release.yml
File metadata and controls
74 lines (60 loc) · 1.6 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
name: Release
on:
push:
tags:
- 'v*'
env:
ReleaseFileName: SimHubSF1000UDP_${{ github.ref_name }}.zip
jobs:
generate-changelog:
name: Generate changelog
runs-on: ubuntu-22.04
outputs:
release_body: ${{ steps.git-cliff.outputs.content }}
steps:
- name: Checkout
uses: actions/checkout@v6
with:
fetch-depth: 0
- name: Generate a changelog
uses: orhun/git-cliff-action@v4
id: git-cliff
with:
config: cliff.toml
args: -vv -l -s all
env:
OUTPUT: CHANGES.md
build:
runs-on: windows-latest
steps:
- name: Checkout
uses: actions/checkout@v6
- name: Setup MSBuild
uses: microsoft/setup-msbuild@v3
- name: Build plugin DLL file
run: msbuild /p:Configuration=Release
- name: Zip output DLL file
run: Compress-Archive -Path ./SimHubSF1000UDP/bin/Release/SimHubSF1000UDP.dll -DestinationPath ./${{ env.ReleaseFileName }}
- name: Upload artifact
uses: actions/upload-artifact@v7
with:
name: build-file
path: ${{ env.ReleaseFileName }}
create-release:
runs-on: ubuntu-latest
needs:
- generate-changelog
- build
permissions:
contents: write
steps:
- name: Download artifact
uses: actions/download-artifact@v8
with:
name: build-file
- name: Create release
uses: softprops/action-gh-release@v2
with:
body: "${{ needs.generate-changelog.outputs.release_body }}"
fail_on_unmatched_files: true
files: ${{ env.ReleaseFileName }}