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
14 changes: 14 additions & 0 deletions .github/.changesets/config.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
{
"$schema": "https://unpkg.com/@changesets/[email protected]/schema.json",
"changelog": false,
"commit": false,
"fixed": [],
"linked": [],
"access": "public",
"baseBranch": "main",
"updateInternalDependencies": "patch",
"privatePackages": {
"version": true,
"tag": true
}
}
60 changes: 60 additions & 0 deletions .github/workflows/npm-release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,60 @@
name: Release new NPM version

on:
pull_request:
types: [closed]
branches:
- main

concurrency:
group: changeset-${{ github.head_ref }}
cancel-in-progress: true

jobs:
npm:
name: Changeset release
runs-on: ubuntu-latest
permissions:
contents: write # to be able to publish a GitHub release
pull-requests: write # to be able to comment on released pull requests
id-token: write # to enable use of OIDC for npm provenance
steps:
- name: Checkout the repo
uses: actions/checkout@v4
with:
fetch-depth: 1

- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: 20.x
cache: 'npm'
cache-dependency-path: '**/package-lock.json'

- name: Install dependencies
run: npm ci --legacy-peer-deps

- name: Check for changesets
id: check_changesets
run: |
if [ -z "$(ls -A .changeset)" ]; then
echo "No changesets found. Exiting."
echo "::set-output name=changesets_found::false"
exit 0
else
echo "::set-output name=changesets_found::true"
fi

- name: Build package
run: npm run build

- name: Publish to NPM
if: steps.check_changesets.outputs.changesets_found == 'true'
id: changesets
uses: changesets/action@v1
with:
publish: npm run changeset publish
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
NPM_CONFIG_PROVENANCE: true
4 changes: 2 additions & 2 deletions .github/workflows/ci.yml → .github/workflows/tests.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: CI
name: Run CI tests

on:
push:
Expand All @@ -12,7 +12,7 @@ jobs:
steps:
- name: Checkout repo
uses: actions/checkout@v3
- name: Setup node and yarn
- name: Setup node and npm
uses: actions/setup-node@v3
with:
cache: npm
Expand Down
4 changes: 3 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -20,4 +20,6 @@ secrets.json
.nvmrc

# VSCode settings
.vscode
.vscode

.DS_Store
Loading
Loading