Skip to content

Commit 06f1774

Browse files
authored
chore(NODE-5580): add release alpha action (#616)
1 parent 0664840 commit 06f1774

File tree

1 file changed

+34
-0
lines changed

1 file changed

+34
-0
lines changed

.github/workflows/release-alpha.yml

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
on:
2+
# Allows us to manually trigger an alpha
3+
# workflow_dispatch can be given an alternative 'ref' to release from a feature branch
4+
workflow_dispatch:
5+
inputs:
6+
alphaVersion:
7+
description: 'Enter alpha version'
8+
required: true
9+
type: string
10+
11+
permissions:
12+
id-token: write
13+
14+
name: release-alpha
15+
16+
jobs:
17+
release-alpha:
18+
runs-on: ubuntu-latest
19+
steps:
20+
- shell: bash
21+
run: |
22+
ALPHA_SEMVER_REGEXP="-alpha(\.([0-9]|[1-9][0-9]+))?$"
23+
24+
if ! [[ "${{ inputs.alphaVersion }}" =~ $ALPHA_SEMVER_REGEXP ]]; then
25+
echo "Invalid alphaVersion string"
26+
exit 1
27+
fi
28+
- uses: actions/checkout@v3
29+
- name: actions/setup
30+
uses: ./.github/actions/setup
31+
- run: npm version "${{ inputs.alphaVersion }}" --git-tag-version=false
32+
- run: npm publish --provenance --tag=alpha
33+
env:
34+
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}

0 commit comments

Comments
 (0)