Skip to content

Merge pull request #2307 from guardian/update-aws-cdk-2.141.0 #1467

Merge pull request #2307 from guardian/update-aws-cdk-2.141.0

Merge pull request #2307 from guardian/update-aws-cdk-2.141.0 #1467

Workflow file for this run

name: CD
on:
push:
branches:
- main
- beta
workflow_dispatch:
jobs:
CD:
runs-on: ubuntu-latest
permissions:
contents: write
id-token: write
pull-requests: write
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version-file: ".nvmrc"
cache: npm
- name: Install
run: npm ci
- name: Build
run: npm run build
- name: Lint
run: npm run lint
- name: Test
run: npm run test
- name: Create Release Pull Request or Publish to npm
id: changesets
uses: changesets/action@v1
with:
publish: npx changeset publish
title: "🦋 Release package updates"
commit: "Bump package version"
env:
# This action will raise a PR to edit package.json and package-lock.json.
# PRs raised by the default `secrets.GITHUB_TOKEN` will not trigger CI, so we need to provide a different token.
# This is a PAT for the guardian-ci user.
# See https://docs.github.com/en/actions/reference/events-that-trigger-workflows#triggering-new-workflows-using-a-personal-access-token
GITHUB_TOKEN: ${{ secrets.GU_GUARDIAN_CI_TOKEN }}
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
- name: Release docs
if: (github.ref == 'refs/heads/main')
run: |
git remote set-url origin https://git:${{ secrets.GITHUB_TOKEN }}@github.com/${{ github.repository }}.git
npm run release:docs