From d0ea2b603e32926e6bdca6ddce11121a9ed885ee Mon Sep 17 00:00:00 2001 From: lifehackerhansol Date: Fri, 30 Sep 2022 10:45:25 -0700 Subject: [PATCH] Add a workflow for build artifacts and releases Switch the target file to `FastVideoDS` to align with other frontend's expected file name. --- .github/workflows/nightly.yml | 33 +++++++++++++++++++++++++++++++++ .github/workflows/release.yml | 32 ++++++++++++++++++++++++++++++++ Makefile | 2 +- 3 files changed, 66 insertions(+), 1 deletion(-) create mode 100644 .github/workflows/nightly.yml create mode 100644 .github/workflows/release.yml diff --git a/.github/workflows/nightly.yml b/.github/workflows/nightly.yml new file mode 100644 index 0000000..e7b15c4 --- /dev/null +++ b/.github/workflows/nightly.yml @@ -0,0 +1,33 @@ +name: Build nightly + +on: + push: + branches: ["*"] + paths-ignore: + - 'README.md' + pull_request: + branches: ["*"] + paths-ignore: + - 'README.md' + workflow_dispatch: + +jobs: + build: + runs-on: ubuntu-latest + container: devkitpro/devkitarm + name: Build with Docker using devkitARM + steps: + - name: Checkout repo + uses: actions/checkout@v3 + - name: Make application + run: | + make + - name: Prepare for build publishing + run: | + mkdir -p ~/artifacts + cp -f FastVideoDS.nds ~/artifacts/ + - name: Publish build to GH Actions + uses: actions/upload-artifact@v2 + with: + path: ~/artifacts/* + name: build diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml new file mode 100644 index 0000000..7630569 --- /dev/null +++ b/.github/workflows/release.yml @@ -0,0 +1,32 @@ +name: Build release + +on: + release: + types: [published] + +jobs: + build: + runs-on: ubuntu-latest + container: devkitpro/devkitarm + name: Build with Docker using devkitARM + steps: + - name: Checkout repo + uses: actions/checkout@v3 + - name: Make application + run: | + make + - name: Prepare for build publishing + run: | + mkdir -p ~/artifacts + cp -f FastVideoDS.nds ~/artifacts/ + - name: Publish build to GH Actions + uses: actions/upload-artifact@v2 + with: + path: ~/artifacts/* + name: build + - name: Release + uses: softprops/action-gh-release@v1 + if: startsWith(github.ref, 'refs/tags/') + with: + files: | + FastVideoDS.nds diff --git a/Makefile b/Makefile index b33c8de..63db0db 100644 --- a/Makefile +++ b/Makefile @@ -5,7 +5,7 @@ ifeq ($(strip $(DEVKITARM)),) $(error "Please set DEVKITARM in your environment. export DEVKITARM=devkitARM") endif -export TARGET := $(shell basename $(CURDIR)) +export TARGET := FastVideoDS export TOPDIR := $(CURDIR) # specify a directory which contains the nitro filesystem