-
Notifications
You must be signed in to change notification settings - Fork 44
106 lines (86 loc) · 3.88 KB
/
prerelease.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
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
name: Prelease
on:
pull_request:
types: [labeled, unlabeled, opened, reopened, synchronize]
concurrency: prerelease-${{ github.ref }}
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
jobs:
prelease_inngest:
runs-on: ubuntu-latest
permissions:
contents: write
id-token: write
defaults:
run:
working-directory: packages/inngest
if: contains(github.event.pull_request.labels.*.name, 'prerelease/inngest')
steps:
- uses: actions/checkout@v3
with:
persist-credentials: false
- uses: ./.github/actions/setup-and-build
- name: Prerelease PR
run: node ../../scripts/release/prerelease.js
env:
TAG: pr-${{ github.event.pull_request.number }}
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
NODE_ENV: test # disable npm access checks; they don't work in CI
DIST_DIR: dist
- name: Update PR with latest prerelease
uses: edumserrano/find-create-or-update-comment@v1
with:
token: ${{ secrets.CHANGESET_GITHUB_TOKEN }}
issue-number: ${{ github.event.pull_request.number }}
body-includes: '<!-- pr-prerelease-comment-inngest -->'
comment-author: 'inngest-release-bot'
body: | # can be a single value or you can compose text with multi-line values
<!-- pr-prerelease-comment-inngest -->
A user has added the <kbd>[prerelease/inngest](https://github.com/inngest/inngest-js/labels/prerelease%2Finngest)</kbd> label, so this PR will be published to npm with the tag `pr-${{ github.event.pull_request.number }}`. It will be updated with the latest changes as you push commits to this PR.
You can install this prerelease version with:
```sh
npm install inngest@pr-${{ github.event.pull_request.number }}
```
The last release was built and published from ${{ github.event.pull_request.head.sha }}.
edit-mode: replace
prerelease_eslint-plugin:
runs-on: ubuntu-latest
permissions:
contents: write
id-token: write
defaults:
run:
working-directory: packages/eslint-plugin
if: contains(github.event.pull_request.labels.*.name, 'prerelease/eslint-plugin')
steps:
- uses: actions/checkout@v3
with:
persist-credentials: false
- uses: ./.github/actions/setup-and-build
with:
install-dependencies: false
build: false
- run: pnpm install
- run: pnpm build
- name: Prerelease PR
run: node ../../scripts/release/prerelease.js
env:
TAG: pr-${{ github.event.pull_request.number }}
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
NODE_ENV: test # disable npm access checks; they don't work in CI
- name: Update PR with latest prerelease
uses: edumserrano/find-create-or-update-comment@v1
with:
token: ${{ secrets.CHANGESET_GITHUB_TOKEN }}
issue-number: ${{ github.event.pull_request.number }}
body-includes: '<!-- pr-prerelease-comment-eslint-plugin -->'
comment-author: 'inngest-release-bot'
body: | # can be a single value or you can compose text with multi-line values
<!-- pr-prerelease-comment-eslint-plugin -->
A user has added the <kbd>[prerelease/eslint-plugin](https://github.com/inngest/inngest-js/labels/prerelease%2Feslint-plugin)</kbd> label, so this PR will be published to npm with the tag `pr-${{ github.event.pull_request.number }}`. It will be updated with the latest changes as you push commits to this PR.
You can install this prerelease version with:
```sh
npm install @inngest/eslint-plugin@pr-${{ github.event.pull_request.number }}
```
The last release was built and published from ${{ github.event.pull_request.head.sha }}.
edit-mode: replace