-
Notifications
You must be signed in to change notification settings - Fork 4
107 lines (103 loc) · 5.31 KB
/
Copy pathbuild.yml
File metadata and controls
107 lines (103 loc) · 5.31 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
# 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-18.04
# 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: Build everything
run: |
sudo chmod +x ./build_game.sh
./build_game.sh
- 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