Repository navigation
141 lines (136 loc) · 7.22 KB
/
Copy pathmain.yml
File metadata and controls
141 lines (136 loc) · 7.22 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
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/FALevelEditor.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/FALevelEditor.x86
- name: Export osx
run: |
sudo ./Godot_v3.2.4-rc1_linux_headless.64 --path "." --export "osx" $GITHUB_WORKSPACE/builds/osx-standard/FALevelEditor.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/FALevelEditor.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/FALevelEditor.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