agb/.github/workflows/publish-agb.yml
2024-02-27 22:04:35 +00:00

55 lines
1.4 KiB
YAML

name: Publish agb
on:
push:
tags:
- v*
jobs:
build:
runs-on: ubuntu-22.04
steps:
- name: Install build tools
run: sudo apt-get update && sudo apt-get install build-essential zip -y
- name: Check out repository
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Login to crates.io
run: cargo login ${{ secrets.CRATE_API }}
- uses: extractions/setup-just@v2
- name: Publish crates
run: just publish
- name: Update template repo
env:
GITHUB_USERNAME: gwilymk
API_TOKEN_GITHUB: ${{ secrets.API_TOKEN_GITHUB }}
run: bash .github/scripts/update-template-repo.sh
- name: Build the examples
run: just build-roms
- name: Upload examples to the release
uses: svenstaro/upload-release-action@v2
with:
repo_token: ${{ secrets.GITHUB_TOKEN }}
file: examples/target/examples.zip
asset_name: examples.zip
tag: ${{ github.ref }}
overwrite: true
- name: Setup mdBook
uses: peaceiris/actions-mdbook@v1
with:
mdbook-version: '0.4.13'
- name: Build the book
run: just build-book
- name: Deploy the book
uses: JamesIves/github-pages-deploy-action@v4
with:
branch: gh-pages
folder: book/book