This repository was archived by the owner on Nov 19, 2026. It is now read-only.
Repository navigation
160 lines (144 loc) · 4.65 KB
/
Copy pathrelease-publish.yml
File metadata and controls
160 lines (144 loc) · 4.65 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
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
name: Release publish
permissions:
contents: write
actions: write
on:
workflow_dispatch:
inputs:
configuration:
description: 'Build configuration (Beta is published as prerelease)'
required: true
default: Beta
type: choice
options:
- Release
- Beta
version:
description: 'Version to release (e.g., 2.14.2)'
required: true
type: string
jobs:
build:
strategy:
fail-fast: false
matrix:
include:
- target: windows_x64
runner: windows-latest
rid: win-x64
platform: x64
- target: windows_ARM64
runner: windows-latest
rid: win-arm64
platform: ARM64
- target: linux_x64
runner: ubuntu-latest
rid: linux-x64
platform: x64
- target: linux_ARM64
runner: ubuntu-24.04-arm
rid: linux-arm64
platform: ARM64
- target: macos_ARM64
runner: macos-latest
rid: osx-arm64
platform: ARM64
- target: macos_x64
runner: macos-latest
rid: osx-x64
platform: x64
uses: ./.github/workflows/reusable-build.yml
with:
configuration: ${{ inputs.configuration }}
target: ${{ matrix.target }}
rid: ${{ matrix.rid }}
platform: ${{ matrix.platform }}
runner: ${{ matrix.runner }}
version: ${{ inputs.version }}
include_secrets: true
secrets: inherit
changelog:
runs-on: ubuntu-latest
steps:
- name: Checkout all
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
with:
fetch-depth: 0
- name: Install git-cliff
uses: taiki-e/install-action@e407f7bafb71fd004bc5c2da3032e5470cbb6ef0 # v2.87.24
with:
tool: git-cliff
- name: Create local release tag
run: git tag -f "v${{ inputs.version }}"
- name: Generate changelog
run: git-cliff --latest -o CHANGELOG.md
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Create or update release
uses: softprops/action-gh-release@efb35369e0ad2afab669f228072c1b0d510eae64 # v3.0.3
with:
draft: true
tag_name: v${{ inputs.version }}
name: Release ${{ inputs.version }}
body_path: CHANGELOG.md
prerelease: ${{ inputs.configuration == 'Beta' }}
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
publish_assets:
needs: [ build, changelog ]
permissions:
actions: read
contents: write
id-token: write
runs-on: ubuntu-latest
steps:
- name: Download Build Artifacts
uses: actions/download-artifact@3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c # v8.0.1
with:
pattern: PCL2_CE_${{ inputs.configuration }}_*
path: ./release
merge-multiple: true
- name: Sign release archives
uses: sigstore/gh-action-sigstore-python@790bc6befb9d733738f18d8f895854b453640ec9 # v3.5.0
with:
inputs: |
release/*.zip
release/*.dmg
release/*.AppImage
release/*.deb
release/*.rpm
verify: true
verify-cert-identity: https://github.com/${{ github.repository }}/.github/workflows/release-publish.yml@refs/heads/dev
verify-oidc-issuer: https://token.actions.githubusercontent.com
- name: Upload archives and signatures to Release
uses: softprops/action-gh-release@efb35369e0ad2afab669f228072c1b0d510eae64 # v3.0.3
with:
draft: true
tag_name: v${{ inputs.version }}
files: release/*
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
publish_draft:
needs: [ publish_assets ]
runs-on: ubuntu-latest
steps:
- name: Publish Draft
uses: softprops/action-gh-release@efb35369e0ad2afab669f228072c1b0d510eae64 # v3.0.3
with:
tag_name: v${{ inputs.version }}
- name: Trigger MirrorChyanUploading
run: |
MRC_CHANNEL="stable"
if [ "${{ inputs.configuration }}" = "Beta" ]; then
MRC_CHANNEL="beta"
fi
for arch in x64 arm64; do
gh workflow run --repo $GITHUB_REPOSITORY mirrorchyan_uploading.yml -f channel=$MRC_CHANNEL -f arch=$arch
done
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Trigger MirrorChyanReleaseNote
run: |
gh workflow run --repo $GITHUB_REPOSITORY mirrorchyan_release_note.yml
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}