-
Notifications
You must be signed in to change notification settings - Fork 1
59 lines (56 loc) · 1.59 KB
/
Copy pathci.yml
File metadata and controls
59 lines (56 loc) · 1.59 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
name: CI
on:
push:
branches:
- master
permissions:
contents: write
pull-requests: write
issues: write
jobs:
semantic-release:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0
- uses: actions/setup-node@v2
with:
node-version: 14
- name: Semantic release
id: semantic
uses: cycjimmy/semantic-release-action@v3
with:
semantic_version: 17
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
outputs:
new_release_published: ${{ steps.semantic.outputs.new_release_published }}
new_release_version: ${{ steps.semantic.outputs.new_release_version }}
deploy-upm:
needs: semantic-release
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0
- name: Create upm branch
run: |
git branch -d upm &> /dev/null || echo upm branch not found
git subtree split -P "$PKG_ROOT" -b upm
git checkout upm
if [[ -d "Samples" ]]; then
git mv Samples Samples~
rm -f Samples.meta
git config --global user.name 'github-bot'
git config --global user.email 'github-bot@users.noreply.github.com'
git commit -am "fix: Samples => Samples~"
fi
git push -f -u origin upm
env:
PKG_ROOT: Assets/Package
- name: Create upm git tag
if: needs.semantic-release.outputs.new_release_published == 'true'
run: |
git tag ${{ needs.semantic-release.outputs.new_release_version }} upm
git push origin --tags