forked from UCL-VR/ubiq
-
Notifications
You must be signed in to change notification settings - Fork 1
53 lines (53 loc) · 1.81 KB
/
upm.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
name: Update upm branch on release
on:
release:
types: [published]
jobs:
build:
name: Build and commit to upm branch
runs-on: ubuntu-latest
steps:
- name: Checkout release
uses: actions/checkout@v3
with:
ref: ${{ github.ref }}
- name: Fetch branch
run: git fetch origin upm:upm || true
- name: Create upm branch if it does not yet exist
run: git branch upm || true
- name: Move to upm branch without changing working copy P0
run: git checkout --detach
- name: Move to upm branch without changing working copy P1
run: git reset --soft upm
- name: Move to upm branch without changing working copy P2
run: git checkout upm
- name: Create upm package
run: |
git rm -rf Documentation
git rm -rf Node
git rm -rf Web
git rm -rf .github
git rm -f README.md
git rm -f LICENSE.txt
git mv Unity/Assets/* .
git rm -rf Unity
git rm -rf Local
git rm -f Local.meta
git rm -f Readme.md
git rm -f Readme.md.meta
git mv Samples Samples~
git rm -f Samples.meta
git rm -f .gitignore
ls -R | grep ":$" | sed -e 's/:$//' -e 's/[^-][^\/]*\// /g' -e 's/^/ /'
- name: Config user name
run: git config --global user.name "github-actions[bot]"
- name: Config user email
run: git config --global user.email "41898282+github-actions[bot]@users.noreply.github.com"
- name: Add
run: git add *
- name: Commit
run: git commit -m "Add upm package for ${GITHUB_REF#refs/*/}"
- name: Tag
run: git tag -a ${GITHUB_REF#refs/*/}-upm -m ""
- name: Push
run: git push --follow-tags --set-upstream origin upm