Skip to content

Commit

Permalink
chore: simplify release workflow by changesets (#537)
Browse files Browse the repository at this point in the history
  • Loading branch information
homura committed Jul 23, 2023
1 parent 3af1f4c commit a49c050
Show file tree
Hide file tree
Showing 51 changed files with 1,238 additions and 2,838 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@2.3.1/schema.json",
"changelog": ["@devtools/changelog", { "repo": "ckb-js/lumos" }],
"commit": false,
"fixed": [["@ckb-lumos/*"]],
"linked": [],
"access": "public",
"baseBranch": "develop",
"updateInternalDependencies": "patch",
"ignore": []
}
25 changes: 25 additions & 0 deletions .changeset/kind-pandas-train.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
---
"@ckb-lumos/experiment-tx-assembler": minor
"@ckb-lumos/transaction-manager": minor
"@ckb-lumos/common-scripts": minor
"@ckb-lumos/config-manager": minor
"@ckb-lumos/light-client": minor
"@ckb-lumos/ckb-indexer": minor
"@ckb-lumos/debugger": minor
"@ckb-lumos/e2e-test": minor
"@ckb-lumos/hd-cache": minor
"@ckb-lumos/molecule": minor
"@ckb-lumos/helpers": minor
"@ckb-lumos/testkit": minor
"@ckb-lumos/toolkit": minor
"@ckb-lumos/runner": minor
"@ckb-lumos/codec": minor
"@ckb-lumos/lumos": minor
"@ckb-lumos/utils": minor
"@ckb-lumos/base": minor
"@ckb-lumos/rpc": minor
"@ckb-lumos/bi": minor
"@ckb-lumos/hd": minor
---

upgrade to typescript 5
28 changes: 28 additions & 0 deletions .changeset/pre.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
{
"mode": "pre",
"tag": "next",
"initialVersions": {
"@ckb-lumos/base": "0.20.0",
"@ckb-lumos/bi": "0.20.0",
"@ckb-lumos/ckb-indexer": "0.20.0",
"@ckb-lumos/codec": "0.20.0",
"@ckb-lumos/common-scripts": "0.20.0",
"@ckb-lumos/config-manager": "0.20.0",
"@ckb-lumos/debugger": "0.20.0",
"@ckb-lumos/e2e-test": "0.20.0",
"@ckb-lumos/experiment-tx-assembler": "0.20.0",
"@ckb-lumos/hd": "0.20.0",
"@ckb-lumos/hd-cache": "0.20.0",
"@ckb-lumos/helpers": "0.20.0",
"@ckb-lumos/light-client": "0.20.0",
"@ckb-lumos/lumos": "0.20.0",
"@ckb-lumos/molecule": "0.20.0",
"@ckb-lumos/rpc": "0.20.0",
"@ckb-lumos/runner": "0.20.0",
"@ckb-lumos/testkit": "0.20.0",
"@ckb-lumos/toolkit": "0.20.0",
"@ckb-lumos/transaction-manager": "0.20.0",
"@ckb-lumos/utils": "0.20.0"
},
"changesets": []
}
22 changes: 22 additions & 0 deletions .github/actions/install-deps/action.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
name: "Install dependencies"
description: "Install dependencies"

runs:
using: "composite"
steps:
- name: Set up pnpm
uses: pnpm/action-setup@v2

- name: Set up node
uses: actions/setup-node@v3
with:
cache: pnpm
node-version: 18

- name: Install dependencies
shell: bash
run: pnpm install

- name: Build project
shell: bash
run: pnpm run build
48 changes: 48 additions & 0 deletions .github/workflows/canary.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
name: Canary
on:
push:
branches:
- develop

permissions:
contents: write

jobs:
canary:
runs-on: ubuntu-latest
steps:
- name: Clone repository
uses: actions/checkout@v3

- name: Install dependencies
uses: ./.github/actions/install-deps

- name: Setup .npmrc file
uses: actions/setup-node@v3
with:
registry-url: "https://registry.npmjs.org"

- name: Canary release
run: |
npx changeset pre exit || true
npx changeset version --snapshot canary-$(git log -1 --pretty=format:%h)
pnpm -r publish --no-git-checks --tag canary
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

- name: Generate commit comment
id: commit-comment
run: |
result="$(node scripts/canary-commit-comment.cjs)"
delimiter="$(openssl rand -hex 8)"
echo "result<<$delimiter" >> $GITHUB_OUTPUT
echo "$result" >> $GITHUB_OUTPUT
echo "$delimiter" >> $GITHUB_OUTPUT
- name: Create commit comment
uses: peter-evans/commit-comment@v2
with:
body: ${{ steps.commit-comment.outputs.result }}
token: ${{ secrets.GITHUB_TOKEN }}
14 changes: 0 additions & 14 deletions .github/workflows/lint-pr.yml

This file was deleted.

185 changes: 0 additions & 185 deletions .github/workflows/publish.yml

This file was deleted.

Loading

2 comments on commit a49c050

@vercel
Copy link

@vercel vercel bot commented on a49c050 Jul 23, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@github-actions
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🚀 New canary release: 0.0.0-canary-a49c050-20230723075710

npm install @ckb-lumos/lumos@0.0.0-canary-a49c050-20230723075710

Please sign in to comment.