forked from hadashiA/VContainer
-
Notifications
You must be signed in to change notification settings - Fork 0
63 lines (55 loc) · 2.14 KB
/
release.yaml
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
name: Release
on:
push:
tags: ["[0-9]+.[0-9]+.[0-9]+*"]
branches: ['release-test']
jobs:
build-unity:
runs-on: ubuntu-latest
env:
UNITY_LICENSE_FILE: ./tmp/ulf
UNITY_BIN: /opt/Unity/Editor/Unity
container:
image: gableroux/unity3d:2020.1.13f1-linux-il2cpp
steps:
- uses: actions/checkout@v2
- name: Decode Unity License File
run: |
mkdir ./tmp
echo -n ${{ secrets.UNITY_LICENSE_2020_1_BASE64 }} | base64 --decode > $UNITY_LICENSE_FILE
- run: $UNITY_BIN -quit -batchmode -nographics -silent-crashes -logFile -manualLicenseFile $UNITY_LICENSE_FILE || exit 0
# set release tag(*.*.*) to env.GIT_TAG
- run: echo "GIT_TAG=${GITHUB_REF#refs/tags/}" >> $GITHUB_ENV
# Execute scripts: Export Package
- name: Export unitypackage
run: $UNITY_BIN -quit -batchmode -nographics -logFile /dev/stdout -exportPackage Assets/VContainer/Runtime Assets/VContainer/Editor VContainer.${{ env.GIT_TAG }}.unitypackage -projectPath ./
working-directory: VContainer
# Store artifacts.
- uses: actions/upload-artifact@v2
with:
name: VContainer.${{ env.GIT_TAG }}.unitypackage
path: ./VContainer/VContainer.${{ env.GIT_TAG }}.unitypackage
# create-release:
# needs: [build-unity]
# runs-on: ubuntu-latest
# steps:
# - run: echo "GIT_TAG=${GITHUB_REF#refs/tags/}" >> $GITHUB_ENV
# # Create Releases
# - uses: actions/create-release@v1
# id: create_release
# env:
# GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
# with:
# tag_name: ${{ env.GIT_TAG }}
# release_name: v${{ env.GIT_TAG }}
# # Download(All) Artifacts to current directory
# - uses: actions/download-artifact@v2-preview
# # Upload to Releases(unitypackage)
# - uses: actions/upload-release-asset@v1
# env:
# GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
# with:
# upload_url: ${{ steps.create_release.outputs.upload_url }}
# asset_path: ./VContainer.${{ env.GIT_TAG }}.unitypackage
# asset_name: VContainer.${{ env.GIT_TAG }}.unitypackage
# asset_content_type: application/octet-stream