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 :
1110    runs-on : ubuntu-latest 
1211    if : github.event.pull_request.head.repo.full_name == github.repository 
1312    steps :
1413      - name : Checkout 
1514        uses : actions/checkout@v3 
1615        with :
1716          fetch-depth : 0 
17+ 
1818      - name : Use Node 
1919        uses : actions/setup-node@v3 
2020        with :
@@ -24,44 +24,12 @@ jobs:
2424      - name : Install Dependencies using Yarn 
2525        run : yarn 
2626
27-       - name : Setup NPM credentials 
28-         run : echo "//registry.npmjs.org/:_authToken=$NPM_TOKEN" >> ~/.npmrc 
29-         env :
30-           NPM_TOKEN : ${{ secrets.NPM_TOKEN }} 
31- 
3227      - name : Release Canary 
3328        id : canary 
34-         uses : ' kamilkisiela/release-canary@master' 
29+         uses : ' the-guild-org/changesets-snapshot-action@main' 
30+         with :
31+           tag : alpha 
32+           prepareScript : ' yarn build' 
3533        env :
36-           GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }} 
3734          NPM_TOKEN : ${{ secrets.NPM_TOKEN }} 
38-         with :
39-           npm-token : ${{ secrets.NPM_TOKEN }} 
40-           npm-script : ' yarn release:canary' 
41-           changesets : true 
42- 
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' 
61-         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 }} 
35+           GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }} 
0 commit comments