1- name : Canary Release
1+ name : release
22
33on :
44 pull_request :
55 paths :
66 - ' .changeset/**/*.md'
77
88jobs :
9- publish- canary :
10- name : Publish Canary
9+ canary :
10+ name : canary
1111 runs-on : ubuntu-latest
1212 if : github.event.pull_request.head.repo.full_name == github.repository
1313 steps :
1414 - name : Checkout
1515 uses : actions/checkout@v3
1616 with :
1717 fetch-depth : 0
18+
1819 - name : Use Node
1920 uses : actions/setup-node@v3
2021 with :
2425 - name : Install Dependencies using Yarn
2526 run : yarn
2627
27- - name : Setup NPM credentials
28- run : echo "//registry.npmjs.org/:_authToken=$NPM_TOKEN" >> ~/.npmrc
29- env :
30- NPM_TOKEN : ${{ secrets.NPM_TOKEN }}
31-
3228 - name : Release Canary
3329 id : canary
3430 uses : ' kamilkisiela/release-canary@master'
@@ -40,28 +36,12 @@ jobs:
4036 npm-script : ' yarn release:canary'
4137 changesets : true
4238
43- - name : Publish a message
44- if : steps.canary.outputs.released == 'true'
45- uses : ' kamilkisiela/pr-comment@master'
46- with :
47- commentKey : canary
48- message : |
49- The latest changes of this PR are available as canary in npm (based on the declared `changesets`):
50-
51- ```
52- ${{ steps.canary.outputs.changesetsPublishedPackages}}
53- ```
54- bot-token : ${{ secrets.GITHUB_TOKEN }}
55- bot : ' github-actions[bot]'
56- github-token : ${{ secrets.GITHUB_TOKEN }}
57-
58- - name : Publish a empty message
59- if : steps.canary.outputs.released == 'false'
60- uses : ' kamilkisiela/pr-comment@master'
39+ - name : Release Canary
40+ id : canary
41+ uses : ' the-guild-org/changesets-snapshot-action@main'
6142 with :
62- commentKey : canary
63- message : |
64- The latest changes of this PR are not available as canary, since there are no linked `changesets` for this PR.
65- bot-token : ${{ secrets.GITHUB_TOKEN }}
66- bot : ' github-actions[bot]'
67- github-token : ${{ secrets.GITHUB_TOKEN }}
43+ tag : alpha
44+ prepareScript : ' yarn build'
45+ env :
46+ NPM_TOKEN : ${{ secrets.NPM_TOKEN }}
47+ GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
0 commit comments