Skip to content

Commit

Permalink
build: use Justfile as command runner
Browse files Browse the repository at this point in the history
  • Loading branch information
florianvazelle committed Nov 4, 2023
1 parent 57b9342 commit 9b88496
Show file tree
Hide file tree
Showing 13 changed files with 310 additions and 283 deletions.
5 changes: 0 additions & 5 deletions .combo.yaml

This file was deleted.

11 changes: 11 additions & 0 deletions .env
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
# Variables used by the Justfile

# Godot

GODOT_VERSION=4.1.2

# Game

GAME_NAME=Marble
GAME_VERSION=1.4.2
GAME_ITCHIO_KEY=marble
59 changes: 0 additions & 59 deletions .github/actions/export-game/action.yml

This file was deleted.

20 changes: 0 additions & 20 deletions .github/actions/upload-artifact/action.yml

This file was deleted.

75 changes: 0 additions & 75 deletions .github/workflows/build.yml

This file was deleted.

19 changes: 0 additions & 19 deletions .github/workflows/pre-commit.yaml

This file was deleted.

92 changes: 0 additions & 92 deletions .github/workflows/publish.yml

This file was deleted.

89 changes: 89 additions & 0 deletions .github/workflows/release-packaging.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,89 @@
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@v1

- name: Load dotenv
run: just ci-load-dotenv

- name: Check
run: just fmt

- name: Ensure version is equal to tag
if: startsWith(github.ref, 'refs/tags/')
run: |
[ "${{ env.game_version }}" == "${{ env.BRANCH_NAME }}" ] || exit 2
build:
runs-on: ubuntu-22.04
timeout-minutes: 30
needs: [check]

steps:
- uses: actions/checkout@v4
- uses: extractions/setup-just@v1

- name: Load dotenv
run: just ci-load-dotenv

- name: Export
run: just export

- name: Upload artifact
uses: actions/upload-artifact@v3
with:
name: ${{ env.game_name }}-v${{ env.game_version }}
path: dist/*
retention-days: 1

publish:
runs-on: ubuntu-22.04
timeout-minutes: 30
needs: [build]

if: startsWith(github.ref, 'refs/tags/')

steps:
- uses: actions/checkout@v4
- uses: extractions/setup-just@v1

- name: Load dotenv
run: just ci-load-dotenv

- name: Download artifact
uses: dawidd6/action-download-artifact@v2
with:
workflow: ${{ github.event.workflow_run.workflow_id }}
name: ${{ env.game_name }}-v${{ env.game_version }}
path: dist/
skip_unpack: false

- name: Publish
run: just publish
env:
BUTLER_API_KEY: ${{ secrets.BUTLER_API_KEY }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

# # Installing rsync is needed in order to deploy to GitHub Pages. Without it, the build will fail.
# - name: Install rsync
# run: |
# apt-get update && apt-get install -y rsync
#
# - name: Deploy to GitHub Pages
# uses: JamesIves/github-pages-deploy-action@v4
# with:
# token: ${{ secrets.GITHUB_TOKEN }}
# branch: gh-pages
# folder: build/web
12 changes: 0 additions & 12 deletions .github/workflows/reuse.yaml

This file was deleted.

Loading

0 comments on commit 9b88496

Please sign in to comment.