generated from MechanicalFlower/godot-template
-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
9f31a04
commit 810b718
Showing
4 changed files
with
125 additions
and
8 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
|
||
name: Download artifact | ||
description: Download artifact. | ||
inputs: | ||
name: | ||
description: The artifact name. | ||
default: "${{ github.job }}" | ||
path: | ||
description: The path to download. | ||
required: true | ||
default: "dist/*" | ||
runs: | ||
using: "composite" | ||
steps: | ||
- name: Download Artifact | ||
uses: actions/download-artifact@v3 | ||
with: | ||
name: ${{ inputs.name }} | ||
path: ${{ inputs.path }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,71 @@ | ||
name: Publish | ||
|
||
# Only trigger, when the build workflow succeeded | ||
on: | ||
workflow_run: | ||
workflows: ["Build"] | ||
types: [completed] | ||
tags: ['[0-9]+.[0-9]+.[0-9]+'] | ||
|
||
jobs: | ||
create_release: | ||
if: ${{ github.event.workflow_run.conclusion == 'success' }} | ||
runs-on: ubuntu-22.04 | ||
|
||
name: Create Release | ||
steps: | ||
- name: Create Draft release | ||
run: | | ||
gh release create "$GITHUB_REF_NAME" \ | ||
--repo="$GITHUB_REPOSITORY" \ | ||
--title="v$GITHUB_REF_NAME" \ | ||
--draft | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
|
||
publish: | ||
needs: create_release | ||
runs-on: ubuntu-20.04 | ||
|
||
strategy: | ||
fail-fast: false | ||
matrix: | ||
include: | ||
- platform: windows | ||
preset: Windows Desktop | ||
|
||
- platform: linux | ||
preset: Linux/X11 | ||
|
||
# - platform: web | ||
# preset: Web | ||
|
||
- platform: mac | ||
preset: macOS | ||
|
||
name: ${{ matrix.preset }} Publish | ||
steps: | ||
- name: Download artifact | ||
uses: ./.github/actions/upload-artifact | ||
with: | ||
name: Marble-${{ matrix.platform }}-v$GITHUB_REF_NAME | ||
path: dist/${{ matrix.platform }} | ||
|
||
- name: Upload to release | ||
run: | | ||
gh release upload "$GITHUB_REF_NAME" \ | ||
--repo="$GITHUB_REPOSITORY" \ | ||
--clobber \ | ||
dist/${{ matrix.platform }}/Marble-${{ matrix.platform }}-v$GITHUB_REF_NAME.zip | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
|
||
- name: Upload to itch.io | ||
uses: josephbmanley/[email protected] | ||
env: | ||
BUTLER_CREDENTIALS: ${{ secrets.BUTLER_API_KEY }} | ||
CHANNEL: ${{ matrix.platform }}-v$GITHUB_REF_NAME | ||
ITCH_GAME: marble | ||
ITCH_USER: mechanical-flower | ||
PACKAGE: dist/${{ matrix.platform }}/Marble-${{ matrix.platform }}-v$GITHUB_REF_NAME.zip | ||
VERSION: $GITHUB_REF_NAME |