Skip to content

nightly: npm

nightly: npm #7

Workflow file for this run

name: 'nightly: npm'
run-name: 'nightly: npm'
on:
schedule:
- cron: '17 4 * * *'
workflow_dispatch:
permissions:
actions: write
contents: read
concurrency:
group: nightly-npm-${{ github.repository }}
cancel-in-progress: false
jobs:
plan-and-dispatch:
name: Plan and dispatch npm nightly
if: ${{ github.ref == format('refs/heads/{0}', github.event.repository.default_branch) && (github.event_name == 'workflow_dispatch' || vars.FLEET_NIGHTLY_RELEASES == 'true') }}
runs-on: ubuntu-26.04
timeout-minutes: 30
steps:
- name: Bootstrap checkout
shell: bash
env:
GITHUB_TOKEN: ${{ github.token }}
SERVER_URL: ${{ github.server_url }}
REPOSITORY: ${{ github.repository }}
SOURCE_SHA: ${{ github.sha }}
run: |
set -euo pipefail
git init -q
git config --local advice.detachedHead false
git remote add origin "${SERVER_URL}/${REPOSITORY}"
AUTH_B64="$(printf 'x-access-token:%s' "${GITHUB_TOKEN}" | base64 | tr -d '\n')"
export GIT_CONFIG_COUNT=1
export GIT_CONFIG_KEY_0="http.${SERVER_URL}/.extraheader"
export GIT_CONFIG_VALUE_0="AUTHORIZATION: basic ${AUTH_B64}"
git fetch --no-tags --depth 1 origin "${SOURCE_SHA}"
git checkout -q --detach FETCH_HEAD
- name: Set up and install
uses: ./.github/actions/fleet/setup-and-install
with:
socket-api-token: ${{ secrets.SOCKET_API_TOKEN_FOR_CLI_AND_SFW }}
payload-token-client-id: ${{ secrets.SOCKET_RELEASE_CLIENT_ID || vars.SOCKET_RELEASE_CLIENT_ID }}
payload-token-private-key: ${{ secrets.SOCKET_RELEASE_APP_PRIVATE_KEY }}
- name: Plan nightly
id: plan
run: pnpm run release:nightly:plan --ecosystem npm
- name: Dispatch staged nightly
if: ${{ steps.plan.outputs.skip == 'false' }}
env:
GH_TOKEN: ${{ github.token }}
NIGHTLY_VERSION: ${{ steps.plan.outputs.version }}
run: pnpm run npm:dispatch --dist-tag nightly --nightly-version "$NIGHTLY_VERSION"