Skip to content

Do not create dummy file anymore, no need to reset TWLCFG if region c… #57

Do not create dummy file anymore, no need to reset TWLCFG if region c…

Do not create dummy file anymore, no need to reset TWLCFG if region c… #57

Workflow file for this run

name: Build hiyaCFW
on:
push:
branches: ["*"]
paths-ignore:
- 'README.md'
pull_request:
branches: ["*"]
paths-ignore:
- 'README.md'
release:
types: [created]
workflow_dispatch:
jobs:
build:
runs-on: ubuntu-latest
container: devkitpro/devkitarm
name: Build with Docker using devkitARM
steps:
- name: Checkout repo
uses: actions/checkout@v4
with:
submodules: recursive
- name: Install tools
run: |
sudo apt-get update
sudo apt-get install p7zip-full python -y
- name: Silence all git safe directory warnings
run: |
git config --system --add safe.directory '*'
git fetch --prune --unshallow --tags
- name: Build
id: build
run: |
make
- name: Pack 7z for nightly
if: ${{ !startsWith(github.ref, 'refs/tags') }}
run: |
mkdir hiyaCFW
cp hiya.dsi hiyaCFW
7z a hiyaCFW.7z hiyaCFW
- name: Pack 7z for release
if: ${{ startsWith(github.ref, 'refs/tags') }}
run: |
mkdir "for SDNAND SD card"
cp hiya.dsi "for SDNAND SD card"
7z a template.7z "for SDNAND SD card"
mv template.7z hiyaCFW.7z
- name: Publish build to GH Actions
uses: actions/upload-artifact@main
with:
path: hiyaCFW.7z
name: build
# Only run this for non-PR jobs.
publish_build:
runs-on: ubuntu-latest
name: Publish build to release
if: ${{ success() && !startsWith(github.ref, 'refs/pull') }}
needs: build
steps:
- name: Download artifacts
uses: actions/download-artifact@main
with:
name: build
path: build
- name: Upload to ${{ github.repository }} release
if: ${{ startsWith(github.ref, 'refs/tags') }}
run: |
ID=$(jq --raw-output '.release.id' $GITHUB_EVENT_PATH)
for file in ${{ github.workspace }}/build/*; do
AUTH_HEADER="Authorization: token ${{ secrets.GITHUB_TOKEN }}"
CONTENT_LENGTH="Content-Length: $(stat -c%s $file)"
CONTENT_TYPE="Content-Type: application/7z-x-compressed"
UPLOAD_URL="https://uploads.github.com/repos/${{ github.repository }}/releases/$ID/assets?name=$(basename $file)"
curl -XPOST -H "$AUTH_HEADER" -H "$CONTENT_LENGTH" -H "$CONTENT_TYPE" --upload-file "$file" "$UPLOAD_URL"
done