Skip to content
Merged

Erf #42

Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
141 changes: 141 additions & 0 deletions .github/workflows/godot-build-release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,141 @@
# This is a basic workflow to help you get started with Actions

name: Godot Build PC Release

# Controls when the action will run.
on:
# Triggers the workflow on push or pull request events but only for the master branch
push:
branches: [ master ]
pull_request:
branches: [ master ]

# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:

jobs:
# This workflow contains a single job called "build"
godot-build:
# The type of runner that the job will run on
runs-on: ubuntu-latest

# Steps represent a sequence of tasks that will be executed as part of the job
steps:
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
- uses: actions/checkout@v2
# Runs a set of commands using the runners shell
- name: Declare some variables
id: vars
shell: bash
run: |
echo "##[set-output name=branch;]$(echo ${GITHUB_REF#refs/heads/})"
echo "::set-output name=sha_short::$(git rev-parse --short HEAD)"
- name: Download Godot and export templates
run: |
sudo apt install unzip
sudo apt install tree
echo *** Downloading Godot Binary ***
wget https://downloads.tuxfamily.org/godotengine/3.2.4/rc1/Godot_v3.2.4-rc1_linux_headless.64.zip
echo *** Downloading Godot Server Export Templates ***
wget https://downloads.tuxfamily.org/godotengine/3.2.4/rc1/Godot_v3.2.4-rc1_export_templates.tpz
echo *** Unzipping Godot Binary ***
unzip Godot_v3.2.4-rc1_linux_headless.64.zip
echo *** Unzipping Godot Server Export Templates ***
unzip Godot_v3.2.4-rc1_export_templates.tpz
echo *** Installing Godot Server Export Templates ***
cd /home/runner/
sudo mkdir -p .local/share/godot
cd .local/share/godot
sudo mkdir -p templates/3.2.4.rc1
sudo cp -r $GITHUB_WORKSPACE/templates/* templates/3.2.4.rc1
echo *** Exporting Files ***
cd $GITHUB_WORKSPACE
sudo mkdir -p builds/{x11-32-standard,x11-64-standard,win-32-standard,win-64-standard,osx-standard}
- name: Export x11-64
run: |
sudo ./Godot_v3.2.4-rc1_linux_headless.64 --path "." --export "x11-64" $GITHUB_WORKSPACE/builds/x11-64-standard/FoxyAdventure.x86_64
- name: Export x11-32
run: |
sudo ./Godot_v3.2.4-rc1_linux_headless.64 --path "." --export "x11-32" $GITHUB_WORKSPACE/builds/x11-32-standard/FoxyAdventure.x86
- name: Export osx
run: |
sudo ./Godot_v3.2.4-rc1_linux_headless.64 --path "." --export "osx" $GITHUB_WORKSPACE/builds/osx-standard/FoxyAdventure.zip
- name: Export win-32
run: |
sudo ./Godot_v3.2.4-rc1_linux_headless.64 --path "." --export "win-32" $GITHUB_WORKSPACE/builds/win-32-standard/FoxyAdventure.exe
- name: Export win-64
run: |
sudo ./Godot_v3.2.4-rc1_linux_headless.64 --path "." --export "win-64" $GITHUB_WORKSPACE/builds/win-64-standard/FoxyAdventure.exe
tree -a
- name: ZIP Builds
run: |
cd $GITHUB_WORKSPACE/builds/win-64-standard
sudo zip build-win-64.zip *
cd $GITHUB_WORKSPACE/builds/win-32-standard
sudo zip build-win-32.zip *
cd $GITHUB_WORKSPACE/builds/x11-64-standard
sudo zip build-x11-64.zip *
cd $GITHUB_WORKSPACE/builds/x11-32-standard
sudo zip build-x11-32.zip *
cd $GITHUB_WORKSPACE/builds/osx-standard
sudo zip build-osx-64.zip *
- name: Create Release
id: create_release
uses: actions/create-release@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # This token is provided by Actions, you do not need to create your own token
with:
tag_name: ${{ steps.vars.outputs.sha_short }}
release_name: Release ${{ steps.vars.outputs.sha_short }}
draft: false
prerelease: false
- name: Upload Release Asset - x11-64
id: upload-release-asset-x1164
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ steps.create_release.outputs.upload_url }} # This pulls from the CREATE RELEASE step above, referencing it's ID to get its outputs object, which include a `upload_url`. See this blog post for more info: https://jasonet.co/posts/new-features-of-github-actions/#passing-data-to-future-steps
asset_path: builds/x11-64-standard/build-x11-64.zip
asset_name: build-x11-64.zip
asset_content_type: application/zip
- name: Upload Release Asset - x11-32
id: upload-release-asset-x1132
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ steps.create_release.outputs.upload_url }} # This pulls from the CREATE RELEASE step above, referencing it's ID to get its outputs object, which include a `upload_url`. See this blog post for more info: https://jasonet.co/posts/new-features-of-github-actions/#passing-data-to-future-steps
asset_path: builds/x11-32-standard/build-x11-32.zip
asset_name: build-x11-32.zip
asset_content_type: application/zip
- name: Upload Release Asset - osx-64
id: upload-release-asset-osx64
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ steps.create_release.outputs.upload_url }} # This pulls from the CREATE RELEASE step above, referencing it's ID to get its outputs object, which include a `upload_url`. See this blog post for more info: https://jasonet.co/posts/new-features-of-github-actions/#passing-data-to-future-steps
asset_path: builds/osx-standard/build-osx-64.zip
asset_name: build-osx-64.zip
asset_content_type: application/zip
- name: Upload Release Asset - win-32
id: upload-release-asset-win32
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ steps.create_release.outputs.upload_url }} # This pulls from the CREATE RELEASE step above, referencing it's ID to get its outputs object, which include a `upload_url`. See this blog post for more info: https://jasonet.co/posts/new-features-of-github-actions/#passing-data-to-future-steps
asset_path: builds/win-32-standard/build-win-32.zip
asset_name: build-win-32.zip
asset_content_type: application/zip
- name: Upload Release Asset - win-64
id: upload-release-asset-win64
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ steps.create_release.outputs.upload_url }} # This pulls from the CREATE RELEASE step above, referencing it's ID to get its outputs object, which include a `upload_url`. See this blog post for more info: https://jasonet.co/posts/new-features-of-github-actions/#passing-data-to-future-steps
asset_path: builds/win-64-standard/build-win-64.zip
asset_name: build-win-64.zip
asset_content_type: application/zip