forked from chr233/ASFEnhance
-
Notifications
You must be signed in to change notification settings - Fork 0
102 lines (85 loc) · 2.82 KB
/
AutoBuild.yml
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
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
name: AutoBuild
on:
push:
tags:
- "*"
env:
DOTNET_SDK_VERSION: 6.0.x
jobs:
publish:
runs-on: windows-latest
steps:
- name: Checkout code
uses: actions/[email protected]
with:
submodules: recursive
- name: Setup .NET Core
uses: actions/[email protected]
with:
dotnet-version: ${{ env.DOTNET_SDK_VERSION }}
- name: Verify .NET Core
run: dotnet --info
- name: Restore packages in preparation for ASFEnhance publishing
run: dotnet restore ASFEnhance -p:ContinuousIntegrationBuild=true --nologo
- name: Publish ASFEnhance on Windows
shell: pwsh
run: |
$script = "./build.ps1";
Set-Location ${{ github.workspace }};
powershell $script;
- name: Upload ASFEnhance-zh-Hans
continue-on-error: true
uses: actions/[email protected]
with:
name: ASFEnhance-zh-Hans
path: dist/ASFEnhance-zh-Hans.zip
- name: Upload ASFEnhance-en-US
continue-on-error: true
uses: actions/[email protected]
with:
name: ASFEnhance-en-US
path: dist/ASFEnhance-en-US.zip
release:
needs: publish
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/[email protected]
- name: Download ASFEnhance-zh-Hans artifact from windows-latest
uses: actions/[email protected]
with:
name: ASFEnhance-zh-Hans
path: out
- name: Download ASFEnhance-en-US artifact from windows-latest
uses: actions/[email protected]
with:
name: ASFEnhance-en-US
path: out
- name: Create ASFEnhance GitHub release
id: github_release
uses: actions/[email protected]
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
tag_name: ${{ github.ref }}
release_name: ASFEnhance ${{ github.ref }}
body: release created bt github actions
prerelease: true
- name: Upload ASFEnhance-zh-Hans to GitHub release
uses: actions/[email protected]
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ steps.github_release.outputs.upload_url }}
asset_path: out/ASFEnhance-zh-Hans.zip
asset_name: ASFEnhance-zh-Hans.zip
asset_content_type: application/zip
- name: Upload ASFEnhance-zh-Hans to GitHub release
uses: actions/[email protected]
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ steps.github_release.outputs.upload_url }}
asset_path: out/ASFEnhance-en-US.zip
asset_name: ASFEnhance-en-US.zip
asset_content_type: application/zip