mirror of
https://github.com/italicsjenga/agb.git
synced 2024-12-24 00:31:34 +11:00
50 lines
1.4 KiB
YAML
50 lines
1.4 KiB
YAML
name: Publish agb
|
|
|
|
on:
|
|
push:
|
|
tags:
|
|
- v*
|
|
|
|
|
|
jobs:
|
|
build:
|
|
runs-on: ubuntu-20.04
|
|
steps:
|
|
- name: Install build tools
|
|
run: sudo apt-get update && sudo apt-get install build-essential binutils-arm-none-eabi zip -y
|
|
- name: Check out repository
|
|
uses: actions/checkout@v2
|
|
- name: Login to crates.io
|
|
run: cargo login ${{ secrets.CRATE_API }}
|
|
- name: Publish agb
|
|
run: cargo publish
|
|
working-directory: ./agb
|
|
|
|
- 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: bash .github/scripts/build-example-gba-files.sh
|
|
- 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: Install mdbook
|
|
run: cargo install mdbook
|
|
- name: Build the book
|
|
run: mdbook build
|
|
working-directory: book
|
|
- name: Deploy the book
|
|
uses: JamesIves/github-pages-deploy-action@v4.2.5
|
|
with:
|
|
branch: gh-pages
|
|
folder: book/book
|