Skip to content

chore(NODE-5580): add release alpha action #616

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Aug 24, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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 }}