forked from mongodb/node-mongodb-native
-
Notifications
You must be signed in to change notification settings - Fork 0
34 lines (30 loc) · 983 Bytes
/
release-alpha.yml
File metadata and controls
34 lines (30 loc) · 983 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
31
32
33
34
on:
# Allows us to manually trigger an alpha
# workflow_dispatch can be given an alternative 'ref' to release from a feature branch
workflow_dispatch:
inputs:
alphaVersion:
description: 'Enter alpha version'
required: true
type: string
permissions:
id-token: write
name: release-alpha
jobs:
release-alpha:
runs-on: ubuntu-latest
steps:
- shell: bash
run: |
ALPHA_SEMVER_REGEXP="-alpha(\.([0-9]|[1-9][0-9]+))?$"
if ! [[ "${{ inputs.alphaVersion }}" =~ $ALPHA_SEMVER_REGEXP ]]; then
echo "Invalid alphaVersion string"
exit 1
fi
- uses: actions/checkout@v5
- name: Install Node and dependencies
uses: mongodb-labs/drivers-github-tools/node/setup@v2
- run: npm version "${{ inputs.alphaVersion }}" --git-tag-version=false
- run: npm publish --provenance --tag=alpha
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}