New update script (#6) #19
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: Check and Publish | |
on: | |
push: | |
branches: | |
- main | |
pull_request: | |
jobs: | |
check: | |
runs-on: ubuntu-latest | |
name: Check | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Set up Python | |
with: | |
python-version: "3.11" | |
uses: actions/setup-python@v4 | |
- name: Setup virtual env | |
working-directory: tool | |
run: | | |
python -m venv .venv | |
. ./.venv/bin/activate | |
pip install -r requirements.txt | |
- name: Run check | |
run: | | |
. ./tool/.venv/bin/activate | |
./tool/check.py | |
publish: | |
if: ${{ github.ref == 'refs/heads/main' }} | |
needs: | |
- check | |
runs-on: [self-hosted, skytemple-dist] | |
name: Publish | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Set up Python | |
with: | |
python-version: "3.11" | |
uses: actions/setup-python@v4 | |
- name: Setup virtual env | |
working-directory: tool | |
run: | | |
python -m venv .venv | |
. ./.venv/bin/activate | |
pip install -r requirements.txt | |
- name: Run publish | |
run: | | |
. ./tool/.venv/bin/activate | |
mkdir out/banners -p | |
get.py products.yml out/products.yml | |
./tool/update-products-yml.py | |
dist.py out/products.yml products.yml | |
dist.py out/banners banners |