Skip to content

Merge pull request #26 from hectorm/dependabot/github_actions/github-… #113

Merge pull request #26 from hectorm/dependabot/github_actions/github-…

Merge pull request #26 from hectorm/dependabot/github_actions/github-… #113

Workflow file for this run

# yaml-language-server: $schema=https://json.schemastore.org/github-workflow.json
name: "Main"
on:
push:
tags: ["*"]
branches: ["*"]
pull_request:
branches: ["*"]
schedule:
- cron: "25 12 * * 3"
workflow_dispatch:
permissions: {}
jobs:
build:
name: "Build"
runs-on: "ubuntu-latest"
permissions:
contents: "read"
container:
image: "docker.io/hectorm/wasm:latest"
options: "--user 0:0"
steps:
- name: "Checkout"
uses: "actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332"
- name: "Build"
working-directory: "./sfxr/"
run: |
emmake make clean all
mkdir ../dist/
install -m644 ./sfxr.html ../dist/index.html
install -m644 ./sfxr.js ../dist/sfxr.js
install -m644 ./sfxr.wasm ../dist/sfxr.wasm
install -m644 ./sfxr.data ../dist/sfxr.data
install -m644 ./sfxr.png ../dist/sfxr.png
- name: "Upload artifacts"
if: "startsWith(github.ref, 'refs/tags/v')"
uses: "actions/upload-pages-artifact@56afc609e74202658d3ffba0e8f6dda462b719fa"
with:
path: "./dist/"
retention-days: 1
publish-github-pages:
name: "GitHub Pages publish"
if: "startsWith(github.ref, 'refs/tags/v')"
needs: ["build"]
runs-on: "ubuntu-latest"
permissions:
id-token: "write"
pages: "write"
environment:
name: "github-pages"
url: "${{ steps.deployment.outputs.page_url }}"
steps:
- name: "Publish"
id: "deployment"
uses: "actions/deploy-pages@d6db90164ac5ed86f2b6aed7e0febac5b3c0c03e"