This repository has been archived by the owner on Jul 14, 2020. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
105 lines (104 loc) · 3.71 KB
/
continous-deployment.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
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
name: Continous deployment for assetbundler
on:
push:
tags:
- 'v*' # Push events to matching v*, i.e. v1.0, v20.15.10
jobs:
build-macos:
runs-on: macos-latest
steps:
- uses: actions/checkout@v2
- uses: actions/setup-go@v2-beta
with:
go-version: '^1.13.1'
- name: Build for OSX
run: |
go build -o libassetbundler.dylib -buildmode=c-shared ./pkg/assetbundler
zip assetbundler_macos.zip libassetbundler.dylib libassetbundler.h
- uses: actions/upload-artifact@v1
with:
name: assetbundler_macos
path: ./assetbundler_macos.zip
build-windows:
runs-on: windows-latest
steps:
- uses: actions/checkout@v2
- uses: actions/setup-go@v2-beta
with:
go-version: '^1.13.1'
- name: Build for Windows
run: |
go build -o libassetbundler_x64.dll -buildmode=c-shared ./pkg/assetbundler
set GOARCH=386
go build -o libassetbundler_x86.dll -buildmode=c-shared ./pkg/assetbundler
- name: Archive Windows binaries
run: Compress-Archive -Path .\libassetbundler_x64.dll, .\libassetbundler_x86.dll, .\libassetbundler_x64.h, .\libassetbundler_x86.h -DestinationPath assetbundler_windows.zip
- uses: actions/upload-artifact@v1
with:
name: assetbundler_windows
path: ./assetbundler_windows.zip
build-ubuntu:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/setup-go@v2-beta
with:
go-version: '^1.13.1'
- name: Build for Ubuntu
run: |
go build -o libassetbundler.so -buildmode=c-shared ./pkg/assetbundler
zip assetbundler_ubuntu.zip libassetbundler.so libassetbundler.h
- uses: actions/upload-artifact@v1
with:
name: assetbundler_ubuntu
path: ./assetbundler_ubuntu.zip
release:
runs-on: ubuntu-latest
needs: [build-macos, build-windows, build-ubuntu]
steps:
- uses: actions/download-artifact@v1
with:
name: assetbundler_macos
- uses: actions/download-artifact@v1
with:
name: assetbundler_windows
- uses: actions/download-artifact@v1
with:
name: assetbundler_ubuntu
- name: Create Release
id: create_release
uses: actions/create-release@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
tag_name: ${{ github.ref }}
release_name: Release ${{ github.ref }}
draft: false
prerelease: true
- name: Upload OSX library
uses: actions/upload-release-asset@v1.0.1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ steps.create_release.outputs.upload_url }}
asset_path: ./assetbundler_macos/assetbundler_macos.zip
asset_name: assetbundler_macos.zip
asset_content_type: application/zip
- name: Upload Windows library
uses: actions/upload-release-asset@v1.0.1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ steps.create_release.outputs.upload_url }}
asset_path: ./assetbundler_windows/assetbundler_windows.zip
asset_name: assetbundler_windows.zip
asset_content_type: application/zip
- name: Upload Ubuntu library
uses: actions/upload-release-asset@v1.0.1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ steps.create_release.outputs.upload_url }}
asset_path: ./assetbundler_ubuntu/assetbundler_ubuntu.zip
asset_name: assetbundler_ubuntu.zip
asset_content_type: application/zip