Skip to content

Upgrade BuildTools + Default ARM7 to BlocksDS v11 #21

Upgrade BuildTools + Default ARM7 to BlocksDS v11

Upgrade BuildTools + Default ARM7 to BlocksDS v11 #21

name: Build NeoDS using latest blocksDS tools
on:
workflow_dispatch:
push:
branches: ["*"]
paths-ignore:
- 'README.md'
pull_request:
branches: ["*"]
paths-ignore:
- 'README.md'
jobs:
build:
runs-on: ubuntu-latest
container: skylyrac/blocksds:slim-latest
name: Build with BlocksDS using its docker container
outputs:
commit_tag: ${{ steps.git.outputs.commit_tag }}
commit_hash: ${{ steps.git.outputs.commit_hash }}
author_name: ${{ steps.git.outputs.author_name }}
committer_name: ${{ steps.git.outputs.committer_name }}
commit_subject: ${{ steps.git.outputs.commit_subject }}
commit_message: ${{ steps.git.outputs.commit_message }}
current_date: ${{ steps.git.outputs.current_date }}
steps:
- name: Checkout repo
uses: actions/checkout@v3
- name: Build package & set Git Defines
id: build
run: make VERBOSE=1
- name: Set Git Defines
id: git
run: |
echo ::set-output name=commit_tag::$(git describe --abbrev=0 --tags)
echo ::set-output name=commit_hash::$(git log --format=%h -1)
# Webhook info
echo ::set-output name=author_name::$(git log -1 "$GITHUB_SHA" --pretty="%aN")
echo ::set-output name=committer_name::$(git log -1 "$GITHUB_SHA" --pretty="%cN")
echo ::set-output name=commit_subject::$(git log -1 "$GITHUB_SHA" --pretty="%s")
echo ::set-output name=commit_message::$(git log -1 "$GITHUB_SHA" --pretty="%b")
echo ::set-output name=current_date::$(date +"%Y%m%d-%H%M%S")
- name: Publish build to GH Actions
uses: actions/upload-artifact@v2
with:
path: NeoDS.nds
name: neods-nightly
send_webhook:
runs-on: ubuntu-latest
needs: [build]
name: Send Discord webhook
if: ${{ !startsWith(github.ref, 'refs/pull') }}
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 }}
COMMIT_MESSAGE: ${{ needs.build.outputs.commit_message }}
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 }}