Skip to content

Commit

Permalink
Merge pull request #2071 from guardian/jc/test-changeset
Browse files Browse the repository at this point in the history
  • Loading branch information
joecowton1 authored Oct 30, 2023
2 parents 4770423 + b62d266 commit 1c6493b
Show file tree
Hide file tree
Showing 7 changed files with 4,853 additions and 9,305 deletions.
8 changes: 8 additions & 0 deletions .changeset/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
# Changesets

Hello and welcome! This folder has been automatically generated by `@changesets/cli`, a build tool that works
with multi-package repos, or single-package repos to help you version and publish your code. You can
find the full documentation for it [in our repository](https://github.com/changesets/changesets)

We have a quick list of common questions to get you started engaging with this project in
[our documentation](https://github.com/changesets/changesets/blob/main/docs/common-questions.md)
10 changes: 10 additions & 0 deletions .changeset/config.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
{
"$schema": "https://unpkg.com/@changesets/[email protected]/schema.json",
"changelog": "@changesets/cli/changelog",
"commit": false,
"fixed": [],
"linked": [],
"access": "public",
"baseBranch": "main",
"ignore": []
}
35 changes: 32 additions & 3 deletions .github/workflows/cd.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,21 +4,50 @@ on:
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@v3
with:
node-version-file: '.nvmrc'
node-version-file: ".nvmrc"
cache: npm
- name: CD

- 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:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
run: ./script/cd

- name: Release docs
if: (github.ref == 'refs/heads/main')
run: |
git remote set-url origin https://git:${{secrets.GITHUB_TOKEN}}@github.com/${{vars.GITHUB_REPOSITORY}}.git
npm run release:docs
16 changes: 1 addition & 15 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,26 +3,12 @@ on:
pull_request:
workflow_dispatch:
jobs:
# see https://github.com/marketplace/actions/semantic-pull-request
lint-PR:
runs-on: ubuntu-latest
steps:
- uses: amannn/[email protected]
with:
# When using "Squash and merge" on a PR with only one commit, GitHub
# will suggest using that commit message instead of the PR title for the
# merge commit, and it's easy to commit this by mistake. Enable this option
# to also validate the commit message for one commit PRs.
# https://github.com/amannn/action-semantic-pull-request
validateSingleCommit: true
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
CI:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v3
with:
node-version-file: '.nvmrc'
node-version-file: ".nvmrc"
cache: npm
- run: ./script/ci
Loading

0 comments on commit 1c6493b

Please sign in to comment.