-
Notifications
You must be signed in to change notification settings - Fork 11
39 lines (36 loc) · 1.33 KB
/
release-canary.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
name: release-canary
on:
pull_request:
types:
- labeled
jobs:
publish:
if: ${{ github.event.label.name == 'build' }}
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
with:
ref: ${{ github.event.pull_request.head.sha }}
# Setup .npmrc file to publish to npm
- uses: actions/setup-node@v3
with:
node-version: '16.x'
registry-url: 'https://registry.npmjs.org'
# Ensure that the README is published with the package
- run: rm -f packages/cli/README.md && cp README.md packages/cli
- run: echo "PR_VERSION=0.0.0-pr.${{github.event.pull_request.number}}.$(git rev-parse --short HEAD)" >> $GITHUB_ENV
- run: npm ci
- run: npm version ${{ env.PR_VERSION }} --workspace packages/cli
- run: npm publish --workspace packages/cli --tag experimental
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
- uses: marocchino/sticky-pull-request-comment@v2
with:
header: PR Preview Release Published
hide_and_recreate: true
hide_classify: "OUTDATED"
message: |
🎉 Experimental release successfully published [on npm](https://npmjs.com/package/checkly/v/${{env.PR_VERSION}})
```
npm install checkly@${{env.PR_VERSION}}
```