Make Hell preset automatically have all tricks enabled #5
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: Continuous Integration Workflow | |
on: [push, pull_request, workflow_dispatch] | |
jobs: | |
test: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Install pnpm | |
uses: pnpm/action-setup@v4 | |
- name: Use Node.js 22.x | |
uses: actions/setup-node@v4 | |
with: | |
node-version: 22.x | |
cache: 'pnpm' | |
- name: Install dependencies | |
run: pnpm i | |
- name: Test | |
run: pnpm test | |
deploy: | |
if: ${{ github.event_name == 'push' && (github.ref == 'refs/heads/master' || contains(github.ref, 'refs/tags/')) }} | |
needs: test | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Extract Version (Tag) | |
if: ${{ contains(github.ref, 'refs/tags/') }} | |
run: | | |
echo "VERSION=${{ github.ref_name }}" >> $GITHUB_ENV | |
echo "NETLIFY_SITE_ID=${{ secrets.NETLIFY_SITE_ID_STABLE }}" >> $GITHUB_ENV | |
- name: Extract Version (Commit) | |
if: ${{ !contains(github.ref, 'refs/tags/') }} | |
run: | | |
short_sha=$(echo ${{ github.sha }} | cut -c1-7) | |
echo "VERSION=dev-${short_sha}" >> $GITHUB_ENV | |
echo "NETLIFY_SITE_ID=${{ secrets.NETLIFY_SITE_ID_DEV }}" >> $GITHUB_ENV | |
- name: Add n64 toolchain repo | |
uses: myci-actions/add-deb-repo@10 | |
with: | |
repo: deb http://practicerom.com/public/packages/debian staging main | |
repo-name: practicerom | |
keys-asc: https://practicerom.com/public/packages/debian/pgp.pub | |
- name: Install system dependencies | |
run: sudo apt-get install n64-ultra cmake ninja-build | |
- name: Install pnpm | |
uses: pnpm/action-setup@v4 | |
- name: Use Node.js 22.x | |
uses: actions/setup-node@v4 | |
with: | |
node-version: 22.x | |
cache: 'pnpm' | |
- name: Install dependencies | |
run: pnpm i | |
- name: Build | |
run: | | |
pnpm run build | |
- name: Deploy to netlify (stable) | |
if: ${{ contains(github.ref, 'refs/tags/') }} | |
run: | | |
npm i -g [email protected] | |
cd packages/gui/dist && netlify deploy --filter @ootmm/gui --prod --dir ./ | |
env: | |
NETLIFY_AUTH_TOKEN: ${{ secrets.NETLIFY_AUTH_TOKEN }} | |
NETLIFY_SITE_ID: ${{ secrets.NETLIFY_SITE_ID_STABLE }} | |
- name: Deploy to netlify (dev) | |
if: ${{ github.ref == 'refs/heads/master' }} | |
run: | | |
npm i -g [email protected] | |
cd packages/gui/dist && netlify deploy --filter @ootmm/gui --prod --dir ./ | |
env: | |
NETLIFY_AUTH_TOKEN: ${{ secrets.NETLIFY_AUTH_TOKEN }} | |
NETLIFY_SITE_ID: ${{ secrets.NETLIFY_SITE_ID_DEV }} |