megabit-os/.github/workflows/build.yml
2021-09-05 17:23:30 +09:00

31 lines
836 B
YAML

name: build
on:
push: { branches: [main] }
release:
types: [published]
jobs:
main:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- run: sudo apt-get update
- run: sudo apt-get install -y qemu-user-static
- run: bin/build
- run: sudo bin/img-gen
- uses: actions/upload-artifact@v2
with:
name: megabit-armhf
path: megabit-armhf.*
release:
if: github.event.release.prerelease
needs: main
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/download-artifact@v2
with: { name: megabit-armhf }
- uses: actions/github-script@v4
with:
script: |
const script = require("./.github/scripts/release.js");
await script({ github, context, glob });