55 lines
1.8 KiB
YAML
55 lines
1.8 KiB
YAML
name: Release
|
|
|
|
on:
|
|
workflow_dispatch:
|
|
issue_comment:
|
|
types: [ created ]
|
|
|
|
jobs:
|
|
build_and_release:
|
|
name: Build and release
|
|
runs-on: ubuntu-latest
|
|
container: devkitpro/devkita64:latest
|
|
if: github.event_name == 'workflow_dispatch' || contains(github.event.comment.body, '/release-action')
|
|
|
|
steps:
|
|
- name: Install libnx (pinned for toolchain compatibility)
|
|
run: |
|
|
git config --global --add safe.directory "*"
|
|
# Pin to a release tag; main branch requires newer newlib (RMutex.thread_tag) than container has
|
|
git clone --depth 1 --branch v4.6.0 --recurse-submodules https://github.com/switchbrew/libnx.git
|
|
cd libnx
|
|
make install -j$(nproc)
|
|
shell: bash
|
|
- name: Checkout latest code
|
|
uses: actions/checkout@v5
|
|
with:
|
|
ref: master
|
|
clean: true
|
|
fetch-depth: 0
|
|
fetch-tags: true
|
|
submodules: recursive
|
|
- name: Setup ENV parameters
|
|
run: |
|
|
VER_FILE=Makefile
|
|
VERSION=$(awk '/^LPVERSION_MAJOR/{print $3}' $VER_FILE).$(awk '/^LPVERSION_MINOR/{print $3}' $VER_FILE).$(awk '/^LPVERSION_BUGFX/{print $3}' $VER_FILE)
|
|
echo "TAG=${VERSION}" >> "${GITHUB_ENV}"
|
|
echo "RELEASE_NAME=CommonProblemResolver ${VERSION}" >> "${GITHUB_ENV}"
|
|
shell: bash
|
|
- name: Build
|
|
run: |
|
|
export DEVKITPRO=/opt/devkitpro
|
|
make all
|
|
shell: bash
|
|
- name: Upload Release Asset
|
|
uses: softprops/action-gh-release@v2.0.9
|
|
with:
|
|
name: ${{ env.RELEASE_NAME }}
|
|
tag_name: ${{ env.TAG }}
|
|
draft: false
|
|
prerelease: false
|
|
generate_release_notes: yes
|
|
make_latest: true
|
|
files: |
|
|
output/CommonProblemResolver.bin
|