forked from Meloong-Git/PCL
-
Notifications
You must be signed in to change notification settings - Fork 0
83 lines (72 loc) · 2.34 KB
/
release-stable_publish.yml
File metadata and controls
83 lines (72 loc) · 2.34 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
81
82
83
name: Publish (Release)
on:
release:
types: [published]
jobs:
build:
if: ${{ !github.event.release.prerelease }}
strategy:
matrix:
include:
- configuration: Release
architecture: x64
- configuration: Release
architecture: ARM64
fail-fast: false
uses: ./.github/workflows/reusable-build.yml
with:
configuration: ${{ matrix.configuration }}
architecture: ${{ matrix.architecture }}
secrets: inherit
changelog:
runs-on: ubuntu-latest
continue-on-error: true
if: ${{ !github.event.release.prerelease }}
steps:
- name: Checkout all
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Install git-cliff
uses: taiki-e/install-action@git-cliff
- name: Generate changelog
run: git-cliff
- name: Add changelog to release
uses: softprops/action-gh-release@v2.2.2
with:
tag_name: ${{ github.event.release.tag_name }}
body_path: CHANGELOG.md
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
rename_and_release:
needs: [build, changelog]
runs-on: ubuntu-latest
strategy:
matrix:
include:
- configuration: Release
architecture: x64
- configuration: Release
architecture: ARM64
steps:
- name: Download Build Artifact
uses: actions/download-artifact@v4
with:
name: PCL2_CE_${{ matrix.configuration }}_${{ matrix.architecture }}
path: ./artifact
- name: Rename binaries
run: |
mv "./artifact/Plain Craft Launcher 2.exe" "PCL2_CE_${{ matrix.configuration }}_${{ matrix.architecture }}.exe"
- name: Upload binary to Release
uses: softprops/action-gh-release@v2.2.2
with:
files: |
PCL2_CE_${{ matrix.configuration }}_${{ matrix.architecture }}.exe
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Trigger MirrorChyanUploading
run: |
gh workflow run --repo $GITHUB_REPOSITORY mirrorchyan_uploading.yml -f channel=stable -f arch=${{ matrix.architecture == 'x64' && 'x64' || 'arm64' }}
gh workflow run --repo $GITHUB_REPOSITORY mirrorchyan_release_note.yml
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}