Skip to content

[pre-commit.ci] pre-commit autoupdate #30

[pre-commit.ci] pre-commit autoupdate

[pre-commit.ci] pre-commit autoupdate #30

name: Release Packaging
on:
push:
workflow_dispatch:
env:
BRANCH_NAME: ${{ github.head_ref || github.ref_name }}
jobs:
check:
runs-on: ubuntu-22.04
timeout-minutes: 30
steps:
- uses: actions/checkout@v4
- uses: extractions/setup-just@v2
- name: Load dotenv
run: just ci-load-dotenv
# Retry multiple times, sometimes in CI, gdlint raise "file exists"
- name: Check
uses: nick-fields/retry@v2
with:
timeout_minutes: 1
max_attempts: 3
command: just fmt
- name: Ensure version is equal to tag
if: startsWith(github.ref, 'refs/tags/')
run: |
[ "${{ env.game_version }}" == "${{ env.BRANCH_NAME }}" ] || exit 2
test:
runs-on: ubuntu-22.04
timeout-minutes: 30
strategy:
fail-fast: true
matrix:
godot_version: ['4.1.3', '4.2.1']
steps:
- uses: actions/checkout@v4
- uses: extractions/setup-just@v2
- uses: actions/setup-python@v5
with:
python-version: '3.10'
- name: Test
run: just test
env:
GODOT_VERSION: ${{ matrix.godot_version }}
doc:
runs-on: ubuntu-22.04
timeout-minutes: 30
needs: [check, test]
if: github.ref == 'refs/heads/main'
steps:
- uses: actions/checkout@v4
- uses: extractions/setup-just@v2
- uses: actions/setup-python@v5
with:
python-version: '3.10'
- run: git config user.name 'github-actions[bot]' && git config user.email 'github-actions[bot]@users.noreply.github.com'
- name: Deploy docs
run: just doc-deploy
publish:
runs-on: ubuntu-22.04
timeout-minutes: 30
needs: [check, test]
if: startsWith(github.ref, 'refs/tags/')
steps:
- uses: actions/checkout@v4
- uses: extractions/setup-just@v2
- name: Load dotenv
run: just ci-load-dotenv
- name: Publish
run: just publish
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}