Skip to content

.github/workflows/release.yml #12

.github/workflows/release.yml

.github/workflows/release.yml #12

Workflow file for this run

on:
workflow_dispatch:
permissions:
contents: write
packages: write
jobs:
build:
runs-on: ubuntu-latest
name: Export Game
outputs:
tag: ${{ steps.tag.outputs.new_tag }}
steps:
- name: checkout
uses: actions/checkout@v4
- name: Bump version and push tag
id: tag
uses: anothrNick/[email protected]
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
WITH_V: true
DEFAULT_BUMP: patch
- name: Build
id: export
uses: firebelley/[email protected]
with:
godot_executable_download_url: https://github.com/godotengine/godot/releases/download/4.3-stable/Godot_v4.3-stable_linux.x86_64.zip
godot_export_templates_download_url: https://github.com/godotengine/godot/releases/download/4.3-stable/Godot_v4.3-stable_export_templates.tpz
relative_project_path: ./game/
cache: true
archive_output: false
use_preset_export_path: true
- name: Bundle Head Script
run: |
cp ./game/builds/web/enable-threads.js ${BUILD_DIR}/web/
env:
BUILD_DIR: ${{ steps.export.outputs.build_directory }}
- name: Setup Pages
uses: actions/configure-pages@v5
- name: Upload pages artifact
uses: actions/upload-pages-artifact@v3
with:
path: ${{ steps.export.outputs.build_directory }}/web
- name: Upload artifact
uses: actions/upload-artifact@v4
with:
name: game
path: |
${{ steps.export.outputs.build_directory }}/linux/
${{ steps.export.outputs.build_directory }}/win/
deploy:
needs: build
permissions:
contents: write
packages: write
pages: write
id-token: write
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
runs-on: ubuntu-latest
steps:
- name: Deploy to Github Pages
id: deployment
uses: actions/deploy-pages@v4
- name: Download Artifact
uses: actions/download-artifact@v4
with:
name: game
- name: Create Zips
run: |
zip -r linux.zip linux
zip -r win.zip win
- name: create release
uses: ncipollo/[email protected]
with:
token: ${{ secrets.GITHUB_TOKEN }}
generateReleaseNotes: true
tag: ${{ needs.build.outputs.tag }}
artifacts: linux.zip,win.zip