Skip to content

release-nightly

release-nightly #334

on:
schedule:
# Timezone is UTC
# https://crontab.guru/#0_0_*_*_*
# At 00:00 every day.
- cron: '0 0 * * *'
# Allows us to manually trigger a nightly
# Since npm prevents duplicate releases we can run this at any time
# As long as the commit hash has changed on main a release will be published
workflow_dispatch: {}
permissions:
id-token: write
name: release-nightly
jobs:
release-nightly:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Install Node and dependencies
uses: mongodb-labs/drivers-github-tools/node/setup@v2
- id: build_nightly
run: npm run build:nightly
- if: ${{ steps.build_nightly.outputs.publish == 'yes' }}
run: npm publish --provenance --tag=nightly
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}