Skip to content

Commit

Permalink
add workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
PoloNX committed Mar 10, 2024
1 parent 8805387 commit 8614fd7
Showing 1 changed file with 49 additions and 0 deletions.
49 changes: 49 additions & 0 deletions .github/workflows/switch.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
name: build

on:
push:
branches: [ "*" ]
pull_request:
types: [opened, reopened]
workflow_dispatch:
inputs:
nx:
description: build nintendo switch
type: boolean

permissions:
contents: write

jobs:
build-nx:
runs-on: ubuntu-latest
if: ${{ inputs.nx || github.event_name != 'workflow_dispatch' }}
container: devkitpro/devkita64
steps:
- uses: actions/checkout@v4
with:
submodules: recursive
- name: Set workspace permissions
run: |
chown $(id -u):$(id -g) -R "$GITHUB_WORKSPACE"
git config --system --add safe.directory '*'
- name: Update dependencies
run: |
git config --global --add safe.directory /__w/SimpleModDownloader/SimpleModDownloader/lib/borealis
git config --global --add safe.directory /__w/SimpleModDownloader/SimpleModDownloader/lib/ini
git config --global --add safe.directory /__w/SimpleModDownloader/SimpleModDownloader
git submodule update --init --recursive
- name: Build SimpleModDownloader
run: |
cmake -B cmake-build-switch -DCMAKE_BUILD_TYPE=Release -DPLATFORM_SWITCH=ON
cmake --build cmake-build-switch --target SimpleModDownloader.nro
- name: Set outputs
id: vars
run: echo "sha_short=${{ matrix.driver }}-$(git rev-parse --short HEAD)" >> $GITHUB_OUTPUT
- name: Upload Assets
uses: actions/upload-artifact@v4
with:
name: UpcomingSwitchGames
path: |
cmake-build-switch/UpcomingSwitchGames.nro
cmake-build-switch/UpcomingSwitchGames.elf

0 comments on commit 8614fd7

Please sign in to comment.