v1.4.0: Shiny new libnds just dropped #9
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Build release | |
on: | |
release: | |
types: [published] | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
container: devkitpro/devkitarm | |
name: Build with Docker using devkitARM | |
outputs: | |
commit_tag: ${{ steps.vars.outputs.commit_tag }} | |
commit_hash: ${{ steps.vars.outputs.commit_hash }} | |
author_name: ${{ steps.vars.outputs.author_name }} | |
committer_name: ${{ steps.vars.outputs.committer_name }} | |
commit_subject: ${{ steps.vars.outputs.commit_subject }} | |
current_date: ${{ steps.vars.outputs.current_date }} | |
steps: | |
- name: Checkout repo | |
uses: actions/checkout@v4 | |
- name: Setup environment | |
run: git config --global safe.directory '*' | |
- name: Make application | |
id: build | |
run: | | |
make | |
- name: Set variables | |
id: vars | |
run: | | |
echo "commit_tag=$(git describe --abbrev=0 --tags)" >> $GITHUB_OUTPUT | |
echo "commit_hash=$(git log --format=%h -1)" >> $GITHUB_OUTPUT | |
# Webhook info | |
echo "author_name=$(git log -1 $GITHUB_SHA --pretty=%aN)" >> $GITHUB_OUTPUT | |
echo "committer_name=$(git log -1 $GITHUB_SHA --pretty=%cN)" >> $GITHUB_OUTPUT | |
echo "commit_subject=$(git log -1 $GITHUB_SHA --pretty=%s)" >> $GITHUB_OUTPUT | |
CURRENT_DATE=$(date +"%Y%m%d-%H%M%S") | |
echo "current_date=$CURRENT_DATE" >> $GITHUB_OUTPUT | |
- name: Publish build to GH Actions | |
uses: actions/upload-artifact@v4 | |
with: | |
path: dsbf_dump.nds | |
name: dsbf_dump-nightly | |
- name: Release | |
uses: softprops/action-gh-release@v2 | |
if: startsWith(github.ref, 'refs/tags/') | |
with: | |
files: | | |
dsbf_dump.nds | |
send_webhook: | |
runs-on: ubuntu-latest | |
needs: [build] | |
name: Send Discord webhook | |
env: | |
CURRENT_DATE: ${{ needs.build.outputs.current_date }} | |
AUTHOR_NAME: ${{ needs.build.outputs.author_name }} | |
COMMITTER_NAME: ${{ needs.build.outputs.committer_name }} | |
COMMIT_SUBJECT: ${{ needs.build.outputs.commit_subject }} | |
steps: | |
- name: Send success webhook | |
if: ${{ success() }} | |
run: | | |
curl -o send.sh https://raw.githubusercontent.com/DS-Homebrew/discord-webhooks/master/send-ghactions.sh | |
chmod +x send.sh | |
./send.sh success ${{ secrets.WEBHOOK_URL }} | |
- name: Send failure webhook | |
if: ${{ failure() }} | |
run: | | |
curl -o send.sh https://raw.githubusercontent.com/DS-Homebrew/discord-webhooks/master/send-ghactions.sh | |
chmod +x send.sh | |
./send.sh failure ${{ secrets.WEBHOOK_URL }} |