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
26 changes: 7 additions & 19 deletions .github/workflows/manual-publish-docs.yml
Original file line number Diff line number Diff line change
@@ -1,23 +1,14 @@
name: Manual Publish Package
name: Manual Publish Docs
on:
workflow_dispatch:
inputs:
dry-run:
description: 'Is this a dry run. If so no package will be published.'
type: boolean
required: true
prerelease:
description: 'Is this a prerelease. If so, then the latest tag will not be updated in npm.'
type: boolean
required: true

permissions:
id-token: write
contents: write
concurrency: ${{ github.workflow }}-${{ github.ref }}
jobs:
publish-package:
runs-on: ubuntu-latest
publish-docs:
runs-on: ubuntu-22.04-8core-32gb
steps:
- uses: launchdarkly/common-actions/ssh-key-by-repo@main
with:
Expand All @@ -30,22 +21,19 @@ jobs:
GITHUB_TOKEN: ${{ github.token }}
- run: git submodule update --init --recursive

- uses: actions/checkout@v4
with:
path: gh-pages
ref: gh-pages

- name: Setup Node.js environment
uses: actions/setup-node@v4
with:
node-version: lts/*
cache: 'yarn'

- name: Install js dependencies
run: yarn
run: yarn install --mode=skip-build
env:
PUPPETEER_SKIP_CHROMIUM_DOWNLOAD: true

- name: Build docs
run: yarn docs
run: yarn docs --filter highlight.run

- uses: launchdarkly/gh-actions/actions/publish-pages@publish-pages-v1.0.2
name: 'Publish to Github pages'
Expand Down
52 changes: 47 additions & 5 deletions .github/workflows/manual-publish.yml
Original file line number Diff line number Diff line change
@@ -1,14 +1,31 @@
name: Manual Publish Package
on:
workflow_dispatch:
inputs:
dry-run:
description: 'Is this a dry run. If so no package will be published.'
type: boolean
required: true
prerelease:
description: 'Is this a prerelease. If so, then the latest tag will not be updated in npm.'
type: boolean
required: true
release_highlight:
description: 'Should release @highlight-run/... packages.'
type: boolean
required: true
release_launchdarkly:
description: 'Should release @launchdarkly/... packages.'
type: boolean
required: true

permissions:
id-token: write
contents: write
concurrency: ${{ github.workflow }}-${{ github.ref }}
jobs:
publish-package:
runs-on: ubuntu-latest
runs-on: ubuntu-22.04-8core-32gb
steps:
- uses: launchdarkly/common-actions/ssh-key-by-repo@main
with:
Expand All @@ -28,23 +45,48 @@ jobs:
cache: 'yarn'

- name: Install js dependencies
run: yarn
run: yarn install

- name: Build npm packages
run: yarn build
- name: Build & test
run: yarn test
env:
NEXT_PUBLIC_HIGHLIGHT_PROJECT_ID: 1jdkoe52
REACT_APP_COMMIT_SHA: ${{ github.event.pull_request.head.sha || github.sha }}

- name: Configure yarn npm registry credentials for highlight
if: ${{ inputs.release_highlight == 'true' }}
run: |
yarn config set npmRegistryServer "https://registry.npmjs.org"
yarn config set npmAuthToken "${NPM_TOKEN}"
env:
NPM_TOKEN: ${{ secrets.NPM_TOKEN_HIGHLIGHT_RUN }}

- name: Publish highlight npm packages
if: ${{ inputs.release_highlight == 'true' }}
id: changesets-publish
uses: changesets/action@v1
with:
publish: yarn publish:highlight
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
NPM_TOKEN: ${{ secrets.NPM_TOKEN_HIGHLIGHT_RUN }}
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN_HIGHLIGHT_RUN }}

- uses: launchdarkly/gh-actions/actions/release-secrets@release-secrets-v1.2.0
if: ${{ inputs.release_launchdarkly == 'true' }}
name: 'Get NPM token'
with:
aws_assume_role: ${{ vars.AWS_ROLE_ARN }}
ssm_parameter_pairs: '/production/common/releasing/npm/token = NODE_AUTH_TOKEN'

- name: Configure yarn npm registry credentials
- name: Configure yarn npm registry credentials for launchdarkly
if: ${{ inputs.release_launchdarkly == 'true' }}
run: |
yarn config set npmRegistryServer "https://registry.npmjs.org"
yarn config set npmAuthToken "${NODE_AUTH_TOKEN}"

- name: Publish
if: ${{ inputs.release_launchdarkly == 'true' }}
shell: bash
run: |
./scripts/publish-npm.sh
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/turbo.yml
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ jobs:
cache: 'yarn'

- name: Install js dependencies
run: yarn
run: yarn install

- name: Check yarn for duplicate deps
run: yarn dedupe --check
Expand Down
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
],
"scripts": {
"build": "yarn turbo run build --filter '!@rrweb/web-extension' --filter '!nextjs'",
"docs": "yarn turbo run docs",
"e2e:cloudflare": "yarn turbo run dev --filter cloudflare-worker...",
"e2e:express": "yarn turbo run dev --filter express...",
"e2e:nestjs": "yarn turbo run dev --filter nestjs",
Expand Down
1 change: 1 addition & 0 deletions turbo.json
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@
]
},
"docs": {
"dependsOn": ["^build"],
"inputs": [
"src/**/*.tsx",
"src/**/*.ts",
Expand Down
Loading