-
Notifications
You must be signed in to change notification settings - Fork 1
57 lines (46 loc) · 1.29 KB
/
release.yml
File metadata and controls
57 lines (46 loc) · 1.29 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
name: Build & Release .NET App
on:
push:
tags:
- 'v*'
permissions:
contents: write
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout source
uses: actions/checkout@v4
- name: Setup .NET
uses: actions/setup-dotnet@v4
with:
dotnet-version: '10.0'
- name: Publish
run: |
cd BangumiNet
dotnet publish -c Release -r win-x64 -p:Version=${GITHUB_REF_NAME#v} -o ../publish
- name: Create archive
run: |
cd publish
zip -r ../${{ github.event.repository.name }}-${{ github.ref_name }}-win64.zip .
shell: bash
- name: Upload artifact
uses: actions/upload-artifact@v4
with:
name: app-archive
path: ${{ github.event.repository.name }}-${{ github.ref_name }}-win64.zip
release:
needs: build
runs-on: ubuntu-latest
steps:
- name: Download build artifact
uses: actions/download-artifact@v4
with:
name: app-archive
path: .
- name: Create GitHub Release
uses: softprops/action-gh-release@v2
with:
files: ${{ github.event.repository.name }}-${{ github.ref_name }}-win64.zip
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}