File tree 5 files changed +806
-138
lines changed
5 files changed +806
-138
lines changed Original file line number Diff line number Diff line change
1
+ # Changesets
2
+
3
+ Hello and welcome! This folder has been automatically generated by ` @changesets/cli ` , a build tool that works
4
+ with multi-package repos, or single-package repos to help you version and publish your code. You can
5
+ find the full documentation for it [ in our repository] ( https://github.com/changesets/changesets )
6
+
7
+ We have a quick list of common questions to get you started engaging with this project in
8
+ [ our documentation] ( https://github.com/changesets/changesets/blob/main/docs/common-questions.md )
Original file line number Diff line number Diff line change
1
+ {
2
+ "$schema" : " https://unpkg.com/@changesets/config@3.0.5/schema.json" ,
3
+ "changelog" : [
4
+ " @changesets/changelog-github" ,
5
+ {
6
+ "repo" : " ngrok-oss/mantle"
7
+ }
8
+ ],
9
+ "commit" : false ,
10
+ "fixed" : [],
11
+ "linked" : [],
12
+ "access" : " public" ,
13
+ "baseBranch" : " main" ,
14
+ "updateInternalDependencies" : " patch" ,
15
+ "ignore" : [" @cfg/*" , " www" ]
16
+ }
Original file line number Diff line number Diff line change 1
1
name : npmjs
2
+
2
3
on :
3
- release :
4
- types : [published]
5
- workflow_dispatch :
4
+ push :
5
+ branches :
6
+ - main
6
7
7
8
jobs :
8
9
publish :
9
10
runs-on : ubuntu-latest
11
+ if : github.repository == 'ngrok-oss/mantle'
10
12
env :
11
13
TURBO_TOKEN : ${{ secrets.TURBO_TOKEN }}
12
14
TURBO_TEAM : ${{ vars.TURBO_TEAM }}
@@ -24,17 +26,19 @@ jobs:
24
26
25
27
- run : pnpm install
26
28
27
- - run : cd packages/mantle && pnpm publish --access public --no-git-checks
29
+ - name : Create Release Pull Request or Publish to npm
30
+ uses : changesets/action@v1
31
+ with :
32
+ publish : pnpm release
33
+ version : pnpm version
28
34
env :
29
- NODE_AUTH_TOKEN : ${{ secrets.NPM_PUBLISH_TOKEN }}
30
-
31
- - name : Grab the released version and store it in an env variable
32
- run : |
33
- VERSION=$(jq -r '.version' ./packages/mantle/package.json)
34
- echo "MANTLE_VERSION=$VERSION" >> $GITHUB_ENV
35
+ GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
36
+ NPM_TOKEN : ${{ secrets.NPM_PUBLISH_TOKEN }}
35
37
36
38
- name : Post to slack
39
+ if : steps.changesets.outputs.published == 'true'
37
40
env :
38
41
SLACK_WEBHOOK_URL : ${{ secrets.SLACK_PUBLISH_WEBHOOK_URL }}
42
+ MANTLE_VERSION : ${{ steps.changesets.outputs.publishedPackages[0].version }}
39
43
run : |
40
44
curl -X POST -H 'Content-type: application/json' --data '{"text":"`@ngrok/mantle@${{ env.MANTLE_VERSION }}` published to npm!\nInstall with: `pnpm add -E @ngrok/mantle@${{ env.MANTLE_VERSION }}`\n<https://github.com/ngrok-oss/mantle/releases/tag/v${{ env.MANTLE_VERSION }}|Release Notes>"}' $SLACK_WEBHOOK_URL
Original file line number Diff line number Diff line change 19
19
"test" : " turbo run test" ,
20
20
"test:watch" : " turbo run test:watch" ,
21
21
"test:ui" : " turbo run test:ui" ,
22
- "typecheck" : " turbo run typecheck"
22
+ "typecheck" : " turbo run typecheck" ,
23
+ "changeset" : " changeset" ,
24
+ "version" : " changeset version" ,
25
+ "release" : " turbo run build --filter=@ngrok/mantle && changeset publish"
23
26
},
24
27
"devDependencies" : {
28
+ "@changesets/changelog-github" : " 0.5.0" ,
29
+ "@changesets/cli" : " 2.27.11" ,
25
30
"@ianvs/prettier-plugin-sort-imports" : " 4.4.1" ,
26
31
"prettier" : " 3.4.2" ,
27
32
"prettier-plugin-tailwindcss" : " 0.6.11" ,
You can’t perform that action at this time.
0 commit comments