Skip to content

CI

CI #25651

Workflow file for this run

# This is a basic workflow to help you get started with Actions
name: CI
on:
push:
branches: [ master ]
schedule:
- cron: '0 * * * *'
# A workflow run is made up of one or more jobs that can run sequentially or in parallel
jobs:
check:
runs-on: ubuntu-latest
outputs:
result: ${{ steps.s1.outputs.output }}
steps:
- uses: actions/checkout@v2
- name: Check for new commits
id: s1
run: |
pip install requests
echo "::set-output name=output::$(python $GITHUB_WORKSPACE/.files/check.py)"
build:
# The type of runner that the job will run on
needs: check
runs-on: ubuntu-latest
if: needs.check.outputs.result == 'Y'
# Steps represent a sequence of tasks that will be executed as part of the job
steps:
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
- uses: actions/checkout@v2
# Runs a set of commands using the runners shell
- name: Build
run: |
docker run -e ENABLE_COMPATIBILITY_REPORTING -v $GITHUB_WORKSPACE:/build_dir devkitpro/devkitarm /bin/bash -ex /build_dir/.files/build.sh
tar -zcvf build.tar.gz ./Luma3DS
- name: Generate Body and Hash
if: ${{ success() }}
id: generate_body
run: |
echo "body=$(git --git-dir ./Luma3DS/.git log -1 --oneline)" >> $GITHUB_ENV
echo "hash=$(git --git-dir ./Luma3DS/.git rev-parse --short --verify HEAD)" >> $GITHUB_ENV
python -mpip install requests
echo "build_number=$(python ./.files/get_build_number.py)" >> $GITHUB_ENV
- name: Create Release
if: ${{ success() }}
id: create_release
uses: actions/create-release@master
env:
GITHUB_TOKEN: ${{ secrets.KEY }}
with:
tag_name: ${{ env.build_number }}-luma3ds-${{ env.hash }}
release_name: ${{ env.build_number }}-luma3ds-${{ env.hash }}
draft: false
prerelease: false
body: |
${{ env.body }}
Link to commit: https://github.com/AuroraWright/Luma3DS/commit/${{ env.hash }}
- name: Upload Release Asset
if: ${{ success() }}
id: upload-release-asset
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.KEY }}
with:
upload_url: ${{ steps.create_release.outputs.upload_url }} # This pulls from the CREATE RELEASE step above, referencing it's ID to get its outputs object, which include a `upload_url`. See this blog post for more info: https://jasonet.co/posts/new-features-of-github-actions/#passing-data-to-future-steps
asset_path: ./Luma3DS/boot.firm
asset_name: boot.firm
asset_content_type: application/octet-stream
- name: Upload artifact for debugs
uses: actions/upload-artifact@v1
with:
name: Luma3ds-build
path: ./build.tar.gz