Skip to content

Commit cc38a8b

Browse files
committed
Controlled labels
1 parent 75fa9c2 commit cc38a8b

File tree

2 files changed

+24
-2
lines changed

2 files changed

+24
-2
lines changed

.github/workflows/release-ghcr.yml

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,15 @@ name: Release to GitHub Container Registry
22

33
on:
44
workflow_dispatch:
5+
inputs:
6+
dist_tag:
7+
description: "This release will be labeled as..."
8+
required: true
9+
default: prerelease
10+
type: choice
11+
options:
12+
- prerelease
13+
- latest
514
workflow_call:
615

716
jobs:
@@ -17,8 +26,10 @@ jobs:
1726
- run: |
1827
if [[ "${{ github.event.release.prerelease }}" == "false" ]]; then
1928
DIST_TAG="latest"
20-
else
29+
elif [[ "${{ github.event.release.prerelease }}" == "true" ]]; then
2130
DIST_TAG="prerelease"
31+
else
32+
DIST_TAG="${{ inputs.dist_tag }}"
2233
fi
2334
npm config set //npm.pkg.github.com/:_authToken $AUTH_TOKEN
2435
lerna publish from-package --yes --summary-file \

.github/workflows/release-npm.yml

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,15 @@ name: Release to NPM Container Registry
22

33
on:
44
workflow_dispatch:
5+
inputs:
6+
dist_tag:
7+
description: "This release will be labeled as..."
8+
required: true
9+
default: prerelease
10+
type: choice
11+
options:
12+
- prerelease
13+
- latest
514
workflow_call:
615

716
jobs:
@@ -17,8 +26,10 @@ jobs:
1726
- run: |
1827
if [[ "${{ github.event.release.prerelease }}" == "false" ]]; then
1928
DIST_TAG="latest"
20-
else
29+
elif [[ "${{ github.event.release.prerelease }}" == "true" ]]; then
2130
DIST_TAG="prerelease"
31+
else
32+
DIST_TAG="${{ inputs.dist_tag }}"
2233
fi
2334
npm config set //registry.npmjs.org/:_authToken $AUTH_TOKEN
2435
lerna publish from-package --yes --summary-file \

0 commit comments

Comments
 (0)