Skip to content

Commit

Permalink
Add Changesets (bluesky-social#1513)
Browse files Browse the repository at this point in the history
* add changesets

* clean up scripts

* remove test changeset

* only build containers on push to production, clean up other workflows

* keep building from main

* remove production branch for now
  • Loading branch information
estrattonbailey committed Sep 6, 2023
1 parent f023cfb commit b3eb3d7
Show file tree
Hide file tree
Showing 6 changed files with 864 additions and 3 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/[email protected]/schema.json",
"changelog": ["@changesets/changelog-github", { "repo": "bluesky-social/atproto" }],
"commit": false,
"fixed": [],
"linked": [],
"access": "public",
"baseBranch": "main",
"updateInternalDependencies": "patch",
"ignore": []
}
34 changes: 34 additions & 0 deletions .github/workflows/publish.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
name: Publish

on:
push:
branches:
- main

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

jobs:
build:
name: Build & Publish
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: pnpm/action-setup@v2
with:
version: 8
- uses: actions/setup-node@v3
with:
node-version: 18
cache: "pnpm"
- run: pnpm i --frozen-lockfile
- run: pnpm verify
- name: Publish
id: changesets
uses: changesets/action@v1
with:
publish: pnpm release
version: pnpm version-packages
commit: "Version packages"
title: "Version packages"
9 changes: 7 additions & 2 deletions .github/workflows/repo.yaml
Original file line number Diff line number Diff line change
@@ -1,14 +1,17 @@
name: repo
name: Test

on:
pull_request:
push:
branches:
- main

concurrency:
group: '${{ github.workflow }}-${{ github.head_ref || github.ref }}'
cancel-in-progress: true

jobs:
build:
name: Build
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
Expand All @@ -22,6 +25,7 @@ jobs:
- run: pnpm i --frozen-lockfile
- run: pnpm build
test:
name: Test
strategy:
matrix:
shard: [1/8, 2/8, 3/8, 4/8, 5/8, 6/8, 7/8, 8/8]
Expand All @@ -38,6 +42,7 @@ jobs:
- run: pnpm i --frozen-lockfile
- run: pnpm test:withFlags --maxWorkers=1 --shard=${{ matrix.shard }} --passWithNoTests
verify:
name: Verify
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
Expand Down
7 changes: 6 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,11 +14,16 @@
"build": "pnpm -r --stream build",
"update-main-to-dist": "pnpm -r --stream update-main-to-dist",
"test": "LOG_ENABLED=false NODE_ENV=development ./packages/dev-infra/with-test-redis-and-db.sh pnpm --stream -r test",
"test:withFlags": "LOG_ENABLED=false NODE_ENV=development ./packages/dev-infra/with-test-redis-and-db.sh pnpm --stream -r test --"
"test:withFlags": "LOG_ENABLED=false NODE_ENV=development ./packages/dev-infra/with-test-redis-and-db.sh pnpm --stream -r test --",
"changeset": "changeset",
"release": "pnpm build && changeset publish",
"version-packages": "changeset version && git add ."
},
"devDependencies": {
"@babel/core": "^7.18.6",
"@babel/preset-env": "^7.18.6",
"@changesets/changelog-github": "^0.4.8",
"@changesets/cli": "^2.26.2",
"@npmcli/package-json": "^3.0.0",
"@swc/core": "^1.3.42",
"@swc/jest": "^0.2.24",
Expand Down
Loading

0 comments on commit b3eb3d7

Please sign in to comment.