Skip to content

Commit

Permalink
build: add changeset publishing automation
Browse files Browse the repository at this point in the history
  • Loading branch information
jviide committed Apr 27, 2024
1 parent 262045d commit a833a6d
Show file tree
Hide file tree
Showing 8 changed files with 4,518 additions and 1,061 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)
11 changes: 11 additions & 0 deletions .changeset/config.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
{
"$schema": "https://unpkg.com/@changesets/config@3.0.0/schema.json",
"changelog": "@changesets/cli/changelog",
"commit": false,
"fixed": [],
"linked": [],
"access": "restricted",
"baseBranch": "main",
"updateInternalDependencies": "patch",
"ignore": []
}
5 changes: 5 additions & 0 deletions .changeset/dull-apricots-pay.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@badrap/libapp": patch
---

Add changeset publishing automation
5 changes: 3 additions & 2 deletions .github/workflows/tests.yml → .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
name: tests
name: CI

on: [push, pull_request]
on: ["push", "pull_request"]

jobs:
build:
Expand All @@ -14,3 +14,4 @@ jobs:
- run: npm ci
- run: npm run lint
- run: npm run typecheck
- run: npm test
22 changes: 0 additions & 22 deletions .github/workflows/publish.yml

This file was deleted.

47 changes: 47 additions & 0 deletions .github/workflows/version-or-publish.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
name: Publish

on:
push:
branches:
- main

concurrency: ${{ github.workflow }}-${{ github.ref }}

jobs:
check:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: 20
cache: npm
- run: npm ci
- run: npm run lint
- run: npm run typecheck
- run: npm test
publish:
needs: check
runs-on: ubuntu-latest
permissions:
contents: write
id-token: write
pull-requests: write
issues: read
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: 20
cache: npm
- name: Install dependencies
run: npm ci
- name: Create Release Pull Request or Publish to npm
id: changesets
uses: changesets/action@v1
with:
version: npm run bump
publish: npm run release
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
Loading

0 comments on commit a833a6d

Please sign in to comment.