Skip to content

Commit fabc6b3

Browse files
authored
feat: introduce changesets for package publishing (#3539)
1 parent 354a940 commit fabc6b3

45 files changed

Lines changed: 1084 additions & 542 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.changeset/config.json

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
{
2+
"$schema": "https://unpkg.com/@changesets/config@3.1.1/schema.json",
3+
"commit": false,
4+
"access": "public",
5+
"baseBranch": "main",
6+
"updateInternalDependencies": "patch",
7+
"changelog": false,
8+
"bumpVersionsWithWorkspaceProtocolOnly": true,
9+
"privatePackages": {
10+
"version": false,
11+
"tag": false
12+
}
13+
}

.changeset/grumpy-hotels-help.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
---
2+
'@human-protocol/sdk': patch
3+
'@human-protocol/logger': patch
4+
'@human-protocol/core': patch
5+
---
6+
7+
chore: changesets added for better release management

.changeset/metal-fans-lay.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
"@human-protocol/sdk": minor
3+
---
4+
5+
feat: read kvstore data using kvstore client

.changeset/petite-comics-float.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
'@human-protocol/sdk': minor
3+
---
4+
5+
chore: use exact core dep version for sdk

.changeset/plenty-melons-fetch.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
"@human-protocol/sdk": patch
3+
---
4+
5+
feat: fixed gas price on aurora testnet

.github/workflows/cd-core.yaml

Lines changed: 0 additions & 30 deletions
This file was deleted.

.github/workflows/cd-logger.yaml

Lines changed: 0 additions & 26 deletions
This file was deleted.

.github/workflows/cd-node-sdk.yaml

Lines changed: 0 additions & 45 deletions
This file was deleted.

.github/workflows/cd-packages.yaml

Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
name: Publish packages
2+
3+
permissions:
4+
contents: write # needed to push tags
5+
6+
on:
7+
push:
8+
branches:
9+
- main
10+
11+
jobs:
12+
publish:
13+
name: Publish packages to NPM
14+
runs-on: ubuntu-latest
15+
steps:
16+
- uses: actions/checkout@v4
17+
- uses: actions/setup-node@v4
18+
with:
19+
node-version-file: .nvmrc
20+
cache: yarn
21+
- name: Install dependencies
22+
run: yarn install --immutable
23+
# If there is no new version for dependency package (e.g. core)
24+
# then `prepack` is not called for it during publish step
25+
# and it's not built. As a result dependant package (e.g. sdk)
26+
# don't have its dependency and can't be build as well,
27+
# so we have to build all deps in their topological order first.
28+
- name: Build packages
29+
run: yarn workspaces foreach --all --no-private -pt run build
30+
- name: Publish packages
31+
run: yarn workspaces foreach --all --no-private -pt npm publish --tolerate-republish --json | tee publish.log
32+
env:
33+
SKIP_PREPACK: true
34+
YARN_NPM_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
35+
- name: Tag published packages
36+
run: node scripts/tag-published-packages.mjs publish.log
37+
- name: Push created tags
38+
run: git push origin --tags

.gitignore

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,11 +43,15 @@ yarn-error.log*
4343
# OS
4444
.DS_Store
4545

46+
# Artifacts
4647
build
4748
dist
4849
*.tsbuildinfo
4950
hardhat-dependency-compiler
51+
package.tgz
5052

51-
# cache
53+
# Cache
5254
cache
5355

56+
# Ignore developer-only local files
57+
.local

0 commit comments

Comments
 (0)