Skip to content

Commit

Permalink
chore(NODE-5580): add release alpha action (#616)
Browse files Browse the repository at this point in the history
  • Loading branch information
W-A-James authored Aug 24, 2023
1 parent 0664840 commit 06f1774
Showing 1 changed file with 34 additions and 0 deletions.
34 changes: 34 additions & 0 deletions .github/workflows/release-alpha.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,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@v3
- name: actions/setup
uses: ./.github/actions/setup
- run: npm version "${{ inputs.alphaVersion }}" --git-tag-version=false
- run: npm publish --provenance --tag=alpha
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}

0 comments on commit 06f1774

Please sign in to comment.