Skip to content

build(deps-dev): bump the commitlint group with 2 updates (#147) #307

build(deps-dev): bump the commitlint group with 2 updates (#147)

build(deps-dev): bump the commitlint group with 2 updates (#147) #307

name: release-please
on:
push:
branches:
- master
permissions:
contents: write
pull-requests: write
jobs:
release:
runs-on: ubuntu-latest
outputs:
release_created: ${{ steps.release.outputs.release_created }}
tag_name: ${{ steps.release.outputs.tag_name }}
steps:
- name: Release Please
uses: googleapis/release-please-action@v5
id: release
with:
release-type: node
deploy:
needs: release
if: ${{ needs.release.outputs.release_created }}
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-latest, macos-latest, windows-latest]
steps:
- name: Checkout repository
uses: actions/checkout@v7
- name: Use Node.js
uses: actions/setup-node@v6
with:
cache: npm
node-version-file: .nvmrc
- name: Install dependencies
run: npm ci --prefer-offline
- name: Build game
shell: bash
run: npm run bundle
- name: Get variables
id: vars
shell: bash
run: |
echo "app_name=$(jq -r .short_name public/manifest.json)" >> $GITHUB_OUTPUT
echo "window_title=$(jq -r .name public/manifest.json)" >> $GITHUB_OUTPUT
echo "CHANNEL=$(echo $RUNNER_OS | tr '[:upper:]' '[:lower:]')" >> $GITHUB_ENV
echo "VERSION=$(jq -r .version package.json)" >> $GITHUB_ENV
- name: Setup butler
uses: remarkablegames/setup-butler@v3
- name: Upload web build
if: runner.os == 'Linux'
working-directory: dist
run: |
butler push . $GITHUB_REPOSITORY:html5 --userversion $VERSION
zip -r web.zip .
gh release upload ${{ needs.release.outputs.tag_name }} web.zip
env:
BUTLER_API_KEY: ${{ secrets.BUTLER_API_KEY }}
GH_TOKEN: ${{ github.token }}
- name: Build app
uses: remarkablemark/tauri-action@v1
id: tauri
with:
app-name: ${{ steps.vars.outputs.app_name }}
app-version: ${{ env.VERSION }}
window-title: ${{ steps.vars.outputs.window_title }}
window-fullscreen: true
icon-path: public/app-icon.png
env:
APPLE_SIGNING_IDENTITY: '-'
- name: Upload app to itch.io
run: >
butler push
${{ steps.tauri.outputs.bundle-path }}
${{ github.repository }}:${{ env.CHANNEL }}
--userversion ${{ env.VERSION }}
env:
BUTLER_API_KEY: ${{ secrets.BUTLER_API_KEY }}
- name: Upload Release Artifact
working-directory: ${{ steps.tauri.outputs.bundle-path }}
shell: bash
run: |
if [[ $RUNNER_OS == 'Windows' ]]; then
7z a -r $CHANNEL.zip ./*
else
zip -r $CHANNEL.zip .
fi
gh release upload ${{ needs.release.outputs.tag_name }} $CHANNEL.zip
env:
GH_TOKEN: ${{ github.token }}