-
-
Notifications
You must be signed in to change notification settings - Fork 26
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Workflow to automatically upload PCK file on release
- Loading branch information
1 parent
a2a2823
commit 94a2ac2
Showing
1 changed file
with
57 additions
and
0 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,57 @@ | ||
name: "Godot Engine" | ||
on: | ||
workflow_dispatch: | ||
pull_request: | ||
release: | ||
types: | ||
- released | ||
|
||
env: | ||
GODOT_VERSION: 3.6 | ||
EXPORT_NAME: ROTA | ||
|
||
jobs: | ||
export: | ||
name: Export | ||
runs-on: ubuntu-latest | ||
container: | ||
image: docker.io/smks/godot-ci:3.6 | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v4 | ||
with: | ||
lfs: true | ||
|
||
- name: Set up export templates | ||
run: | | ||
mkdir -v -p ~/.local/share/godot/templates/ | ||
mv /root/.local/share/godot/templates/${GODOT_VERSION}.stable ~/.local/share/godot/templates/${GODOT_VERSION}.stable | ||
- name: Export | ||
run: | | ||
mkdir --verbose --parents ./export/linux | ||
godot --no-window --path=./project.godot --export-pack "Linux/X11" ./export/linux/${EXPORT_NAME}.pck | ||
- name: Upload artifact | ||
uses: actions/upload-artifact@v4 | ||
with: | ||
name: ${{ env.EXPORT_NAME }} | ||
path: export/linux/${{ env.EXPORT_NAME }}.pck | ||
|
||
release: | ||
name: Release | ||
needs: export | ||
if: ${{ github.event_name == 'release' }} | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Download artifact | ||
uses: actions/download-artifact@v4 | ||
with: | ||
name: ${{ env.EXPORT_NAME }} | ||
|
||
- name: Upload to release | ||
env: | ||
GITHUB_TOKEN: ${{ github.token }} | ||
run: | | ||
tar -cJf ${{ env.EXPORT_NAME }}.tar.xz ${{ env.EXPORT_NAME }}.pck | ||
gh release upload '${{ github.ref_name }}' * --repo '${{ github.repository }}' |