Skip to content

Fix workflow

Fix workflow #18

name: Build CTRDL
on:
push:
branches: [ main ]
pull_request:
branches: [ main ]
env:
BUILD_TYPE: Release
jobs:
Build-Release:
runs-on: ubuntu-latest
permissions:
packages: write
contents: write
container:
image: 'devkitpro/devkitarm'
steps:
- name: Checkout
uses: actions/checkout@v4
with:
persist-credentials: false
- name: Configure CMake
run: cmake -B ${{github.workspace}}/Build -G "Unix Makefiles" -DCMAKE_TOOLCHAIN_FILE="$DEVKITPRO/cmake/3DS.cmake" -DCMAKE_BUILD_TYPE=${{env.BUILD_TYPE}}
- name: Build
run: cmake --build ${{github.workspace}}/Build --config ${{env.BUILD_TYPE}}
- name: Make ZIP
run: |
mv ${{github.workspace}}/Build/_deps/ctrl-build/libCTRL.a ${{github.workspace}}/Build/libCTRL.a
cp Include/dlfcn.h ${{github.workspace}}/Build/dlfcn.h
zip -j CTRDL-${{github.sha}}.zip ${{github.workspace}}/Build/lib*.a ${{github.workspace}}/Build/dlfcn.h ${{github.workspace}}/Build/Tests/dl-test-*.3dsx
- name: Upload Assets
uses: softprops/action-gh-release@v2
with:
name: Release-${{github.sha}}
files: CTRDL-${{github.sha}}.zip
fail_on_unmatched_files: true
tag_name: Release-${{github.run_id}}
make_latest: true
token: ${{secrets.GITHUB_TOKEN}}
generate_release_notes: true