Skip to content

Commit

Permalink
Upload ZIP to Release (#21)
Browse files Browse the repository at this point in the history
  • Loading branch information
RGonzalezTech authored Jul 8, 2024
1 parent c163acf commit 8b351ce
Showing 1 changed file with 31 additions and 8 deletions.
39 changes: 31 additions & 8 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
name: Build Project

on:
release:
types: [published]
push:
tags:
- '*'

env:
GODOT_VERSION: 4.1
Expand All @@ -12,12 +13,12 @@ env:
jobs:
export:
name: Web Export
runs-on: ubuntu-20.04
runs-on: ubuntu-latest
container:
image: barichello/godot-ci:4.1
steps:
- name: Checkout
uses: actions/checkout@v2
uses: actions/checkout@v4
with:
lfs: true
- name: Setup Godot
Expand All @@ -33,18 +34,18 @@ jobs:
mkdir -v -p build/web
godot --headless --verbose --export-release "Itch.io Web Build" ./build/web/$EXPORT_NAME.html
- name: Upload Artifact
uses: actions/upload-artifact@v1
uses: actions/upload-artifact@v4
with:
name: web
path: build/web

deploy:
name: Deploy to Itch.io
runs-on: ubuntu-20.04
runs-on: ubuntu-latest
needs: export
steps:
- name: Download Artifact
uses: actions/download-artifact@v2
uses: actions/download-artifact@v4
with:
name: web
path: build/web
Expand All @@ -56,4 +57,26 @@ jobs:
CHANNEL: html
ITCH_GAME: spacetap
ITCH_USER: rgonzaleztech
PACKAGE: build/web
PACKAGE: build/web

release:
name: Attach to Release
runs-on: ubuntu-latest
needs: export
permissions:
contents: write
steps:
- name: Download Artifact
uses: actions/download-artifact@v4
with:
name: web
- name: Zip files
run: zip -r html_files.zip .
- name: Upload binaries to release
uses: svenstaro/upload-release-action@v2
with:
repo_token: ${{ secrets.GITHUB_TOKEN }}
file: html_files.zip
asset_name: "HTML.Export.${{ github.ref_name }}.zip"
tag: ${{ github.ref_name }}
overwrite: true

0 comments on commit 8b351ce

Please sign in to comment.