-
-
Notifications
You must be signed in to change notification settings - Fork 6
80 lines (73 loc) · 2.29 KB
/
release.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
# Required secrets
# UNITY_LICENSE: The contents of Unity license file
name: 🔖 Release
on:
workflow_dispatch:
push:
branches:
- preview
- main
- v*.x
tags-ignore:
- "**"
jobs:
release:
name: 🔖 Release (${{ github.ref_name }})
runs-on: ubuntu-latest
permissions:
contents: write
pull-requests: write
issues: write
outputs:
channel: ${{ steps.release.outputs.new_release_channel }}
released: ${{ steps.release.outputs.new_release_published }}
tag: ${{ steps.release.outputs.new_release_git_tag }}
steps:
- name: 🚚 Checkout (${{ github.ref_name }})
uses: actions/checkout@v4
- name: 🔖 Run semantic release
uses: cycjimmy/semantic-release-action@v3
id: release
with:
working_directory: Packages/src
extra_plugins: |
@semantic-release/changelog
@semantic-release/git
env:
GITHUB_TOKEN: ${{ github.token }}
- run: |
echo "🔖 New release published: '${{ steps.release.outputs.new_release_published }}'" | tee -a $GITHUB_STEP_SUMMARY
echo "🔖 New release channel: '${{ steps.release.outputs.new_release_channel }}'" | tee -a $GITHUB_STEP_SUMMARY
echo "🔖 New release git tag: '${{ steps.release.outputs.new_release_git_tag }}'" | tee -a $GITHUB_STEP_SUMMARY
merge-to-develop:
name: 🔀 Merge to develop
needs: release
if: needs.release.outputs.released == 'true'
uses: ./.github/workflows/merge.yml
with:
from: ${{ needs.release.outputs.tag }}
to: develop
permissions:
contents: write
merge-to-preview:
name: 🔀 Merge to preview
needs: release
if: needs.release.outputs.released == 'true' && needs.release.outputs.channel == ''
uses: ./.github/workflows/merge.yml
with:
from: ${{ needs.release.outputs.tag }}
to: preview
permissions:
contents: write
deploy:
name: 🚀 Deploy pages
needs: release
if: needs.release.outputs.released == 'true' && needs.release.outputs.channel == ''
uses: ./.github/workflows/deploy.yml
secrets:
UNITY_LICENSE: ${{ secrets.UNITY_LICENSE }}
permissions:
contents: read
checks: write
pages: write
id-token: write