-
Notifications
You must be signed in to change notification settings - Fork 80
72 lines (66 loc) · 2.45 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
name: 🔖 Release
on:
workflow_dispatch:
push:
branches:
- preview
- release
- 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 }}
version: ${{ steps.release.outputs.new_release_version }}
notes: ${{ steps.release.outputs.new_release_notes }}
steps:
- name: 🚚 Checkout (${{ github.ref_name }})
uses: actions/checkout@v4
- name: 🔖 Run semantic release
uses: cycjimmy/semantic-release-action@v4
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 version: '${{ steps.release.outputs.new_release_version }}'" | 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
echo '${{ steps.release.outputs.new_release_notes }}' | tee -a $GITHUB_STEP_SUMMARY
merge-to-develop:
name: 🔀 Merge to develop
needs: release
if: needs.release.outputs.released == 'true' && (github.ref_name == 'release' || github.ref_name == 'preview')
uses: ./.github/workflows/merge.yml
with:
from: ${{ needs.release.outputs.tag }}
to: develop
permissions:
contents: write
snapshot-to-main:
name: 📷 Snapshot to main
needs: release
if: needs.release.outputs.released == 'true' && (github.ref_name == 'release' || github.ref_name == 'preview')
uses: ./.github/workflows/snapshot.yml
with:
from: ${{ needs.release.outputs.tag }}
to: main
path: Packages/src
tag: ${{ needs.release.outputs.version }}
message: "chore(release): ${{ needs.release.outputs.version }} [skip ci]"
permissions:
contents: write