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
24 changes: 13 additions & 11 deletions .github/workflows/canary-publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,30 +3,33 @@ on:
workflow_dispatch:
branches-ignore:
- main

permissions:
id-token: write # Required for OIDC
contents: write
actions: write
attestations: write

env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}

jobs:
deploy_canary:
name: Build And Deploy Canary Release
runs-on: ubuntu-latest
environment: canary
steps:
- name: Checkout
uses: actions/checkout@v4
uses: actions/checkout@v6
with:
token: ${{ secrets.PIPELINE_BOT_PAT }}
fetch-depth: 0

- uses: actions/setup-node@v3
- uses: actions/setup-node@v6
with:
node-version: 'lts/*'
cache: 'npm'

- uses: actions/cache@v3
id: node-cache
with:
path: '**/node_modules'
key: ${{ runner.os }}-${{ hashFiles('package-lock.json') }}
restore-keys: |
${{ runner.os }}-
registry-url: 'https://registry.npmjs.org'

- run: |
npm ci --prefer-offline --no-audit
Expand All @@ -38,7 +41,6 @@ jobs:

- name: Lerna Publish
run: |
echo "//registry.npmjs.org/:_authToken=${{secrets.NPM_TOKEN}}" > ~/.npmrc
preId=$(git rev-parse --abbrev-ref HEAD | tr "[:upper:]" "[:lower:]")
echo "Publishing a canary release..."
npx lerna publish \
Expand Down
60 changes: 22 additions & 38 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,16 @@ on:
push:
branches:
- main

permissions:
id-token: write # Required for OIDC
contents: write
actions: write
attestations: write

env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}

jobs:
test:
name: Test with Node v${{matrix.node}}
Expand All @@ -13,7 +23,7 @@ jobs:
node: [lts/*, node]
steps:
- name: Checkout
uses: actions/checkout@v4
uses: actions/checkout@v6
with:
token: ${{ secrets.PIPELINE_BOT_PAT }}
ref: ${{ github.head_ref || github.ref }}
Expand All @@ -24,17 +34,11 @@ jobs:
fetch-depth: 0

- name: Use Node Version
uses: actions/setup-node@v3
uses: actions/setup-node@v6
with:
node-version: ${{ matrix.node }}
cache: 'npm'

- uses: actions/cache@v3
with:
path: '**/node_modules'
key: ${{ runner.os }}-${{ hashFiles('package-lock.json') }}
restore-keys: |
${{ runner.os }}-
registry-url: 'https://registry.npmjs.org'

- name: Install Dependencies
run: |
Expand Down Expand Up @@ -70,23 +74,17 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
uses: actions/checkout@v6
with:
token: ${{ secrets.PIPELINE_BOT_PAT }}
ref: main
fetch-depth: 0

- uses: actions/setup-node@v3
- uses: actions/setup-node@v6
with:
node-version: 'lts/*'
cache: 'npm'

- uses: actions/cache@v3
with:
path: '**/node_modules'
key: ${{ runner.os }}-${{ hashFiles('package-lock.json') }}
restore-keys: |
${{ runner.os }}-
registry-url: 'https://registry.npmjs.org'

- name: Install Dependencies
run: |
Expand All @@ -99,7 +97,6 @@ jobs:

- name: Lerna Publish Latest
run: |
echo "//registry.npmjs.org/:_authToken=${{secrets.NPM_TOKEN}}" > ~/.npmrc
npx lerna publish \
--conventional-commits \
--changelog-preset @aabenoja/conventional-changelog-eslint-lerna \
Expand All @@ -113,23 +110,17 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
uses: actions/checkout@v6
with:
token: ${{ secrets.PIPELINE_BOT_PAT }}
ref: pre-prod
fetch-depth: 0

- uses: actions/setup-node@v3
- uses: actions/setup-node@v6
with:
node-version: 'lts/*'
cache: 'npm'

- uses: actions/cache@v3
with:
path: '**/node_modules'
key: ${{ runner.os }}-${{ hashFiles('package-lock.json') }}
restore-keys: |
${{ runner.os }}-
registry-url: 'https://registry.npmjs.org'

- name: Install Dependencies
run: |
Expand All @@ -151,7 +142,6 @@ jobs:
# (Pre-prod can be ahead of main, but never behind.)
- name: Lerna Publish Pre-Prod
run: |
echo "//registry.npmjs.org/:_authToken=${{secrets.NPM_TOKEN}}" > ~/.npmrc
npx lerna publish \
--conventional-commits \
--changelog-preset @aabenoja/conventional-changelog-eslint-lerna \
Expand All @@ -168,23 +158,17 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
uses: actions/checkout@v6
with:
token: ${{ secrets.PIPELINE_BOT_PAT }}
ref: main
fetch-depth: 0

- uses: actions/setup-node@v3
- uses: actions/setup-node@v6
with:
node-version: 'lts/*'
cache: 'npm'

- uses: actions/cache@v3
with:
path: '**/node_modules'
key: ${{ runner.os }}-${{ hashFiles('package-lock.json') }}
restore-keys: |
${{ runner.os }}-
registry-url: 'https://registry.npmjs.org'

- name: Install Dependencies
run: |
Expand Down
5 changes: 3 additions & 2 deletions .github/workflows/commit-lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,15 +7,16 @@ jobs:
continue-on-error: true
steps:
- name: Checkout Repo
uses: actions/checkout@v4
uses: actions/checkout@v6
with:
token: ${{ secrets.PIPELINE_BOT_PAT }}
fetch-depth: 0

- uses: actions/setup-node@v3
- uses: actions/setup-node@v6
with:
node-version: 'lts/*'
cache: 'npm'
registry-url: 'https://registry.npmjs.org'

- name: Ensure full history
run: |
Expand Down
4 changes: 3 additions & 1 deletion .github/workflows/preprod-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,9 @@ permissions:
actions: write
attestations: write

env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}

jobs:
pre-prod-release:
if: ${{ github.ref == 'refs/heads/pre-prod' && !contains(github.event.head_commit.message, '[skip-release]') }}
Expand Down Expand Up @@ -40,7 +43,6 @@ jobs:

- name: Lerna Publish
run: |
echo "//registry.npmjs.org/:_authToken=${{secrets.NPM_TOKEN}}" > ~/.npmrc
npx lerna publish \
--conventional-commits \
--changelog-preset @aabenoja/conventional-changelog-eslint-lerna \
Expand Down
4 changes: 2 additions & 2 deletions lerna.json
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
{
"lerna": "2.11.0",
"packages": ["packages/*"],
"version": "21.15.2-pre-prod.8",
"command": {
"publish": {
"message": "Build: [skip ci][skip-release] %s"
}
}
},
"$schema": "node_modules/lerna/schemas/lerna-schema.json"
}
Loading