LunaHook-mirror/.github/workflows/release.yml

133 lines
3.8 KiB
YAML
Raw Normal View History

2024-04-26 11:13:32 +08:00
name: Release
on:
2024-08-09 13:55:29 +08:00
workflow_dispatch:
2024-04-26 11:13:32 +08:00
jobs:
2024-11-02 15:26:54 +08:00
loadversion:
runs-on: windows-latest
outputs:
version: ${{ steps.loadversion.outputs.version }}
steps:
- uses: actions/checkout@v4
- id: loadversion
run: python build.py loadversion | Out-File -FilePath $Env:GITHUB_OUTPUT -Encoding utf8 -Append
2024-04-26 16:45:45 +08:00
build_xp:
runs-on: windows-2019
2024-11-02 15:26:54 +08:00
needs: loadversion
2024-04-26 19:34:44 +08:00
strategy:
matrix:
2024-11-02 15:26:54 +08:00
language: [Chinese,English,Russian,TradChinese]
permissions:
id-token: write
attestations: write
2024-08-09 14:12:43 +08:00
contents: write
2024-04-26 16:45:45 +08:00
steps:
2024-11-02 15:26:54 +08:00
- uses: actions/checkout@v4
- uses: GuillaumeFalourd/setup-windows10-sdk-action@v2
2024-04-26 16:45:45 +08:00
with:
sdk-version: 22621
2024-11-02 15:26:54 +08:00
- run: python build.py build ${{ matrix.language }} winxp
2024-04-26 16:45:45 +08:00
2024-11-02 15:26:54 +08:00
- run: python scripts/pack.py
2024-04-26 19:34:44 +08:00
2024-09-30 13:24:14 +08:00
# - name: Generate attestation for artifact
# uses: actions/attest-build-provenance@v1
# with:
# subject-path: builds/${{ matrix.target }}.zip
2024-11-02 15:26:54 +08:00
- uses: actions/upload-artifact@v4
2024-04-26 16:45:45 +08:00
with:
2024-11-02 15:26:54 +08:00
name: ${{ matrix.language }}_winxp
path: builds/Release_${{ matrix.language }}_winxp.zip
- uses: softprops/action-gh-release@v2
2024-04-26 19:08:58 +08:00
with:
2024-11-02 15:26:54 +08:00
tag_name: ${{ needs.loadversion.outputs.version }}
files: builds/Release_${{ matrix.language }}_winxp.zip
2024-04-26 19:08:58 +08:00
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
2024-04-26 19:34:44 +08:00
2024-04-26 19:06:02 +08:00
build_plugin:
2024-04-26 11:13:32 +08:00
runs-on: windows-latest
2024-11-02 15:26:54 +08:00
needs: [loadversion]
2024-04-26 19:06:02 +08:00
strategy:
matrix:
include:
- cmd: plg32
qtarch: win32_msvc2019
2024-04-26 19:20:31 +08:00
target: plugin32
2024-04-26 19:06:02 +08:00
- cmd: plg64
qtarch: win64_msvc2019_64
2024-04-26 19:20:31 +08:00
target: plugin64
permissions:
id-token: write
attestations: write
2024-08-09 14:12:43 +08:00
contents: write
2024-04-26 11:13:32 +08:00
steps:
2024-11-02 15:26:54 +08:00
- uses: actions/checkout@v4
- uses: GuillaumeFalourd/setup-windows10-sdk-action@v2
2024-04-26 11:13:32 +08:00
with:
sdk-version: 22621
2024-11-02 15:26:54 +08:00
- uses: jurplel/install-qt-action@v3.3.0
2024-04-26 11:13:32 +08:00
with:
2024-04-26 19:06:02 +08:00
version: 5.15.2
2024-04-26 11:13:32 +08:00
host: windows
target: desktop
2024-04-26 19:06:02 +08:00
arch: ${{ matrix.qtarch }}
2024-04-26 11:13:32 +08:00
dir: ${{ runner.temp }}
setup-python: true
2024-11-02 15:26:54 +08:00
- run: python build.py ${{ matrix.cmd }}
2024-04-26 16:45:45 +08:00
2024-11-02 15:26:54 +08:00
- run: python scripts/pack.py
2024-09-30 13:24:14 +08:00
# - name: Generate attestation for artifact
# uses: actions/attest-build-provenance@v1
# with:
# subject-path: builds/${{ matrix.target }}.zip
2024-11-02 15:26:54 +08:00
- uses: actions/upload-artifact@v4
2024-04-26 16:45:45 +08:00
with:
2024-04-26 19:06:02 +08:00
name: ${{ matrix.target }}
2024-04-26 19:20:31 +08:00
path: builds/${{ matrix.target }}.zip
2024-11-02 15:26:54 +08:00
- uses: softprops/action-gh-release@v2
2024-04-26 19:08:58 +08:00
with:
2024-11-02 15:26:54 +08:00
tag_name: ${{ needs.loadversion.outputs.version }}
2024-04-26 19:20:31 +08:00
files: builds/${{ matrix.target }}.zip
2024-04-26 19:08:58 +08:00
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
2024-11-02 15:26:54 +08:00
build:
2024-04-26 19:06:02 +08:00
runs-on: windows-latest
strategy:
matrix:
2024-11-02 15:26:54 +08:00
language: [Chinese,English,Russian,TradChinese]
bits: [32, 64]
permissions:
id-token: write
attestations: write
2024-08-09 14:12:43 +08:00
contents: write
2024-04-26 19:06:02 +08:00
steps:
2024-11-02 15:26:54 +08:00
- uses: actions/checkout@v4
- uses: GuillaumeFalourd/setup-windows10-sdk-action@v2
2024-04-26 16:45:45 +08:00
with:
2024-04-26 19:06:02 +08:00
sdk-version: 22621
2024-11-02 15:26:54 +08:00
- run: python build.py build ${{ matrix.language }} ${{matrix.bits}}
2024-04-26 19:06:02 +08:00
2024-11-02 15:26:54 +08:00
- uses: actions/upload-artifact@v4
2024-04-26 16:45:45 +08:00
with:
2024-11-02 15:26:54 +08:00
name: ${{ matrix.language }}_${{matrix.bits}}
path: builds
release:
runs-on: windows-latest
needs: [build, loadversion]
steps:
- uses: actions/checkout@v4
- uses: actions/download-artifact@v4
2024-04-26 11:13:32 +08:00
with:
2024-11-02 15:26:54 +08:00
path: build
- run: python build.py merge
- uses: softprops/action-gh-release@v2
with:
tag_name: ${{ needs.loadversion.outputs.version }}
files: builds/*
2024-04-26 11:13:32 +08:00
env:
2024-11-02 15:26:54 +08:00
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}