Bump jinja2 from 2.11.3 to 3.1.3 in /meta #76
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: build | |
on: push | |
jobs: | |
test-build-system: | |
runs-on: ubuntu-20.04 | |
steps: | |
- name: Checkout undercooked | |
uses: actions/checkout@v2 | |
with: | |
path: undercooked | |
- name: Test jinja2 template renderer | |
working-directory: undercooked/meta | |
run: python3 -m doctest -v jinja2_render.py | |
build: | |
runs-on: ubuntu-20.04 | |
steps: | |
- name: Checkout rgbds | |
uses: actions/checkout@v2 | |
with: | |
repository: rednex/rgbds | |
ref: v0.5.1 | |
path: rgbds | |
- name: Build rgbds | |
working-directory: rgbds | |
run: make -j 2 Q= CC=gcc | |
- name: Install rgbds | |
working-directory: rgbds | |
run: sudo make -j 2 Q= install | |
- name: Package rgbds | |
working-directory: rgbds | |
run: | | |
mkdir bins | |
cp rgb{asm,link,fix,gfx} bins | |
- name: Upload binaries | |
uses: actions/upload-artifact@v1 | |
with: | |
name: rgbds | |
path: rgbds/bins | |
- name: Download ninja binary | |
run: curl -LO https://github.com/ninja-build/ninja/releases/download/v1.10.2/ninja-linux.zip | |
- name: Extract ninja binary | |
run: unzip ninja-linux.zip | |
- name: Install ninja | |
run: sudo install ninja /usr/local/bin/ | |
- name: Set up Python 3.9 | |
uses: actions/setup-python@v1 | |
with: | |
python-version: 3.9 | |
- name: Install pipenv | |
run: pip install pipenv | |
- name: Checkout undercooked | |
uses: actions/checkout@v2 | |
with: | |
path: undercooked | |
- name: Prepare build system | |
working-directory: undercooked | |
run: ./configure | |
- name: Build undercooked | |
working-directory: undercooked | |
run: ninja | |
- name: Move undercooked ROM into project directory | |
working-directory: undercooked | |
run: mv obj/main.gb undercooked_${{ github.sha }}.gb | |
- name: Upload undercooked ROM as build artifact | |
uses: actions/upload-artifact@v1 | |
with: | |
name: undercooked_${{ github.sha }}.gb | |
path: undercooked/undercooked_${{ github.sha }}.gb | |
- name: Upload remaining undercooked build artifacts | |
uses: actions/upload-artifact@v1 | |
with: | |
name: obj | |
path: undercooked/obj | |
github-release: | |
needs: build | |
runs-on: ubuntu-20.04 | |
if: startsWith(github.ref, 'refs/tags/v') | |
steps: | |
- name: Calculate new version | |
uses: frabert/[email protected] | |
with: | |
string: ${{ github.ref }} | |
pattern: 'refs/tags/v' | |
replace-with: '' | |
id: version | |
- uses: actions/download-artifact@v2 | |
with: | |
name: undercooked_${{ github.sha }}.gb | |
- name: Create Github release | |
uses: actions/create-release@v1 | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
with: | |
body: | | |
[_Play this version directly in your browser_](https://qguv.github.io/undercooked/play/${{ steps.version.outputs.replaced }}) | |
tag_name: ${{ github.ref }} | |
release_name: Release ${{ steps.version.outputs.replaced }} | |
draft: true | |
prerelease: ${{ startsWith(github.ref, 'refs/tags/v0.') }} | |
id: create_release | |
- name: Upload undercooked ROM as release asset | |
uses: actions/upload-release-asset@v1 | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
with: | |
upload_url: ${{ steps.create_release.outputs.upload_url }} | |
asset_path: undercooked_${{ github.sha }}.gb | |
asset_name: undercooked_${{ steps.version.outputs.replaced }}.gb | |
asset_content_type: application/octet-stream | |
gh-pages-release: | |
runs-on: ubuntu-20.04 | |
needs: build | |
if: startsWith(github.ref, 'refs/tags/v') | |
steps: | |
- name: Calculate new version | |
uses: frabert/[email protected] | |
with: | |
string: ${{ github.ref }} | |
pattern: 'refs/tags/v' | |
replace-with: '' | |
id: version | |
- uses: actions/download-artifact@v2 | |
with: | |
name: undercooked_${{ github.sha }}.gb | |
- name: Create new web emulator demo page | |
run: | | |
mkdir -p gh-pages/_posts gh-pages/releases | |
touch "gh-pages/_posts/$(date +%Y-%m-%d-${{ steps.version.outputs.replaced }}.md)" | |
mv undercooked_${{ github.sha }}.gb gh-pages/releases/undercooked_${{ steps.version.outputs.replaced }}.gb | |
- name: Deploy to github pages | |
uses: peaceiris/actions-gh-pages@v3 | |
with: | |
github_token: ${{ secrets.GITHUB_TOKEN }} | |
publish_dir: gh-pages/ | |
keep_files: true | |
enable_jekyll: true |