mirror of
https://github.com/RetroPortingToolKit/psxrecomp
synced 2026-10-26 10:19:47 -04:00
61 lines
1.5 KiB
YAML
61 lines
1.5 KiB
YAML
name: CLI release
|
|
|
|
on:
|
|
pull_request:
|
|
push:
|
|
branches: [master]
|
|
workflow_dispatch:
|
|
release:
|
|
types: [published]
|
|
|
|
permissions:
|
|
contents: read
|
|
|
|
jobs:
|
|
build:
|
|
runs-on: windows-latest
|
|
steps:
|
|
- uses: actions/checkout@v6
|
|
with:
|
|
submodules: recursive
|
|
- name: Install MinGW toolchain (Windows)
|
|
uses: msys2/setup-msys2@v2
|
|
with:
|
|
msystem: MINGW64
|
|
update: true
|
|
install: >-
|
|
mingw-w64-x86_64-gcc
|
|
mingw-w64-x86_64-cmake
|
|
mingw-w64-x86_64-ninja
|
|
mingw-w64-x86_64-python
|
|
- name: Build CLI package
|
|
shell: msys2 {0}
|
|
run: python tools/build_cli.py release
|
|
- name: Smoke test packaged CLI
|
|
shell: msys2 {0}
|
|
run: dist/psxrecomp-cli-windows-x86_64/psxrecomp.exe --help
|
|
- uses: actions/upload-artifact@v6
|
|
with:
|
|
name: psxrecomp-cli-windows-x86_64
|
|
path: dist/psxrecomp-cli-*.zip
|
|
if-no-files-found: error
|
|
|
|
publish-release-assets:
|
|
if: github.event_name == 'release'
|
|
needs: build
|
|
runs-on: ubuntu-latest
|
|
permissions:
|
|
contents: write
|
|
steps:
|
|
- uses: actions/download-artifact@v6
|
|
with:
|
|
pattern: psxrecomp-cli-*
|
|
merge-multiple: true
|
|
- name: Attach CLI packages to release
|
|
env:
|
|
GH_TOKEN: ${{ github.token }}
|
|
RELEASE_TAG: ${{ github.event.release.tag_name }}
|
|
run: >-
|
|
gh release upload "$RELEASE_TAG" psxrecomp-cli-*.zip
|
|
--repo "$GITHUB_REPOSITORY" --clobber
|