-
Notifications
You must be signed in to change notification settings - Fork 29
30 lines (27 loc) · 944 Bytes
/
release.yml
File metadata and controls
30 lines (27 loc) · 944 Bytes
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
name: Release
# Entry workflow that coordinates release processes:
# - Publishes official releases when code is pushed to main, adhering to the single workflow, npm trusted publishing/OIDC pattern
# - Publishes preview releases when triggered via PR comment with [preview_deployment]
on:
push:
branches:
- main
issue_comment:
types: [created]
jobs:
publish-release:
if: github.event_name == 'push' && github.ref == 'refs/heads/main'
uses: ./.github/workflows/publish-release.yml
permissions:
id-token: write
contents: read
secrets: inherit
publish-preview:
if: github.event_name == 'issue_comment' && github.event.issue.pull_request && startsWith(github.event.comment.body, '[preview_deployment]')
uses: ./.github/workflows/preview-release-on-comment.yml
permissions:
id-token: write
contents: read
pull-requests: write
issues: write
secrets: inherit