Skip to content
Merged
Show file tree
Hide file tree
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
8 changes: 6 additions & 2 deletions .github/workflows/npm-publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -36,5 +36,9 @@ jobs:
ref: ${{ inputs.ref }}
- name: Install Node and dependencies
uses: mongodb-labs/drivers-github-tools/node/setup@v3
- run: npm version "${{ inputs.version }}" --git-tag-version=false --allow-same-version
- run: npm publish --provenance --tag="${{ inputs.tag }}"
- run: npm version "$VERSION" --git-tag-version=false --allow-same-version
env:
VERSION: ${{ inputs.version }}
- run: npm publish --provenance --tag="$TAG"
env:
TAG: ${{ inputs.tag }}
113 changes: 0 additions & 113 deletions .github/workflows/release-6.8.yml

This file was deleted.

20 changes: 13 additions & 7 deletions .github/workflows/release-alpha.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,8 @@ on:
type: string

permissions:
id-token: write
actions: write
contents: read

name: release-alpha

Expand All @@ -18,17 +19,22 @@ jobs:
runs-on: ubuntu-latest
steps:
- shell: bash
env:
ALPHA_VERSION: ${{ inputs.alphaVersion }}
Comment thread
PavelSafronov marked this conversation as resolved.
run: |
ALPHA_SEMVER_REGEXP="-alpha(\.([0-9]|[1-9][0-9]+))?$"

if ! [[ "${{ inputs.alphaVersion }}" =~ $ALPHA_SEMVER_REGEXP ]]; then
if ! [[ "$ALPHA_VERSION" =~ $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@v3
- run: npm version "${{ inputs.alphaVersion }}" --git-tag-version=false
- run: npm publish --provenance --tag=alpha
- name: Dispatch npm-publish workflow
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
GH_TOKEN: ${{ github.token }}
ALPHA_VERSION: ${{ inputs.alphaVersion }}
run: |
node ./.github/scripts/dispatch-and-wait.mjs npm-publish.yml \
tag=alpha \
version="$ALPHA_VERSION" \
ref="${{ github.sha }}"
16 changes: 10 additions & 6 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@ on:
permissions:
contents: write
pull-requests: write
id-token: write

Comment thread
tadjik1 marked this conversation as resolved.
name: release-latest

Expand Down Expand Up @@ -91,15 +90,20 @@ jobs:

publish:
needs: [release_please, ssdlc, build]
permissions:
actions: write
contents: read
environment: release
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v5

- name: Install Node and dependencies
uses: mongodb-labs/drivers-github-tools/node/setup@v3

- run: npm publish --provenance --tag=latest
- name: Dispatch npm-publish workflow
if: ${{ needs.release_please.outputs.release_created }}
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
GH_TOKEN: ${{ github.token }}
run: |
node ./.github/scripts/dispatch-and-wait.mjs npm-publish.yml \
tag=latest \
version="$(node -p "require('./package.json').version")" \
ref="${{ github.sha }}"
Comment thread
PavelSafronov marked this conversation as resolved.
Loading