-
Notifications
You must be signed in to change notification settings - Fork 3
59 lines (56 loc) · 2.15 KB
/
build-on-push.yml
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
# Workflow to automatically create deliverables
name: Build on push
on:
[push, pull_request]
jobs:
build:
name: Assembling artifacts
runs-on: ubuntu-20.04
# Note, to satisfy the asset library we need to make sure our zip files have a root folder
# this is why we checkout into demo/godot_vmc_tracker
# and build plugin/godot_vmc_tracker
steps:
- name: Checkout
uses: actions/checkout@v2
with:
path: demo/godot_vmc_tracker
- name: Create Godot VMC Tracker plugin
run: |
mkdir plugin
mkdir plugin/godot_vmc_tracker
mkdir plugin/godot_vmc_tracker/addons
cp -r demo/godot_vmc_tracker/addons/godot_vmc_tracker plugin/godot_vmc_tracker/addons
cp demo/godot_vmc_tracker/LICENSE plugin/godot_vmc_tracker/addons/godot_vmc_tracker
cp demo/godot_vmc_tracker/CONTRIBUTORS.md plugin/godot_vmc_tracker/addons/godot_vmc_tracker
cp demo/godot_vmc_tracker/VERSIONS.md plugin/godot_vmc_tracker/addons/godot_vmc_tracker
rm -rf demo/godot_vmc_tracker/.git
rm -rf demo/godot_vmc_tracker/.github
- name: Create Godot VMC Tracker library artifact
uses: actions/upload-artifact@v2
with:
name: godot_vmc_tracker
path: |
plugin
- name: Create Godot VMC Tracker demo artifact
uses: actions/upload-artifact@v2
with:
name: godot_vmc_tracker_demo
path: |
demo
- name: Zip asset
run: |
cd plugin
zip -qq -r ../godot_vmc_tracker.zip godot_vmc_tracker
cd ../demo
zip -qq -r ../godot_vmc_tracker_demo.zip godot_vmc_tracker
cd ..
if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags')
- name: Create and upload asset
uses: ncipollo/release-action@v1
with:
allowUpdates: true
artifacts: "godot_vmc_tracker.zip,godot_vmc_tracker_demo.zip"
omitNameDuringUpdate: true
omitBodyDuringUpdate: true
token: ${{ secrets.GITHUB_TOKEN }}
if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags')