59
.github/workflows/main.yml
vendored
Normal file
59
.github/workflows/main.yml
vendored
Normal file
@@ -0,0 +1,59 @@
|
|||||||
|
name: Release
|
||||||
|
|
||||||
|
on:
|
||||||
|
issue_comment:
|
||||||
|
types: [ created ]
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
build_and_release:
|
||||||
|
name: Build and release
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
container: devkitpro/devkita64:latest
|
||||||
|
if: contains(github.event.comment.body, '/release-action')
|
||||||
|
|
||||||
|
steps:
|
||||||
|
- name: Update packages
|
||||||
|
run: |
|
||||||
|
sudo -n apt-get update
|
||||||
|
sudo -n apt-get upgrade -y git build-essential
|
||||||
|
sudo -n apt-get install -y zip python3 python3-pip python3-lz4
|
||||||
|
sudo update-alternatives --install /usr/bin/python python /usr/bin/python3.9 1
|
||||||
|
shell: bash
|
||||||
|
- name: Update latest libnx
|
||||||
|
run: |
|
||||||
|
git config --global --add safe.directory "*"
|
||||||
|
git clone --recurse-submodules https://github.com/zdm65477730/libnx.git
|
||||||
|
cd libnx
|
||||||
|
make install -j$(nproc)
|
||||||
|
shell: bash
|
||||||
|
- name: Checkout latest code
|
||||||
|
uses: actions/checkout@v4.1.1
|
||||||
|
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}-with-sigpatch" >> "${GITHUB_ENV}"
|
||||||
|
echo "RELEASE_NAME=CommonProblemResolver ${VERSION}" >> "${GITHUB_ENV}"
|
||||||
|
shell: bash
|
||||||
|
- name: Build
|
||||||
|
run: |
|
||||||
|
export DEVKITPRO=/opt/devkitpro
|
||||||
|
make -f atmosphere.mk dist-no-debug
|
||||||
|
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
|
||||||
Reference in New Issue
Block a user