-
Notifications
You must be signed in to change notification settings - Fork 110
48 lines (43 loc) · 1.2 KB
/
release_to_npm.yml
File metadata and controls
48 lines (43 loc) · 1.2 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
name: Release to npm (OIDC Entry Point)
on:
push:
branches:
- master
workflow_dispatch:
inputs:
release_type:
description: 'Type of release to perform'
required: true
type: choice
options:
- manual
- pr-snapshot
default: 'manual'
permissions:
id-token: write # Required for OIDC token generation
contents: write # Required for git operations (tagging)
jobs:
# Automatic production release on push to master
auto-release:
if: github.event_name == 'push'
uses: ./.github/workflows/_release-reusable.yml
permissions:
id-token: write
contents: write
secrets: inherit
# Manual release (on-demand)
manual-release:
if: github.event_name == 'workflow_dispatch' && inputs.release_type == 'manual'
uses: ./.github/workflows/_manual-release-reusable.yml
permissions:
id-token: write
contents: write
secrets: inherit
# PR snapshot release
pr-release:
if: github.event_name == 'workflow_dispatch' && inputs.release_type == 'pr-snapshot'
uses: ./.github/workflows/_pr-release-reusable.yml
permissions:
id-token: write
contents: write
secrets: inherit