Skip to content

Commit 31c6f6f

Browse files
committed
checkout code for dev release ;-)
1 parent 78d4a34 commit 31c6f6f

File tree

1 file changed

+38
-14
lines changed

1 file changed

+38
-14
lines changed

.github/workflows/ci-tests.yml

Lines changed: 38 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ jobs:
2525

2626
steps:
2727
- uses: actions/checkout@v3
28-
- name: Use Node.js 14
28+
- name: Use Node.js 16
2929
uses: actions/setup-node@v3
3030
with:
3131
node-version: 16
@@ -111,23 +111,51 @@ jobs:
111111
auto-merge:
112112
if: |
113113
always() &&
114-
github.event_name == 'pull_request' &&
115-
github.event.pull_request.user.login == 'foxriver76' &&
116-
github.event.pull_request.base.ref == 'master' &&
117-
startsWith(github.event.pull_request.title, '[NIGHTLY DEV RELEASE]')
118-
114+
github.event_name == 'pull_request'
119115
needs: [ ci ]
120116
runs-on: ubuntu-latest
121117
steps:
118+
- id: automerge
119+
name: automerge
120+
uses: "pascalgn/[email protected]"
121+
env:
122+
GITHUB_TOKEN: "${{ secrets.GITHUB_TOKEN }}"
123+
MERGE_LABELS: "automated pr"
124+
MERGE_FILTER_AUTHOR: "foxriver76"
125+
MERGE_FORKS: "false"
126+
MERGE_DELETE_BRANCH: "false"
127+
UPDATE_LABELS: "automated pr"
128+
MERGE_METHOD: "squash"
129+
130+
- name: Checkout repository
131+
if: steps.automerge.outputs.mergeResult == "merged"
132+
uses: actions/checkout@v3
133+
134+
- name: Use Node.js 16
135+
if: steps.automerge.outputs.mergeResult == "merged"
136+
uses: actions/setup-node@v3
137+
with:
138+
node-version: 16
139+
122140
- name: Determine version
141+
if: steps.automerge.outputs.mergeResult == "merged"
123142
id: version
124143
uses: actions/github-script@v6
125144
with:
126145
result-encoding: string
127146
script: |
128147
return require(`${process.env.GITHUB_WORKSPACE}/lerna.json`).version;
129148
149+
- name: Install dependencies
150+
if: steps.automerge.outputs.mergeResult == "merged"
151+
run: npm ci --ignore-scripts # install typescript and @types do not `setup first`
152+
153+
- name: Build TS files
154+
if: steps.automerge.outputs.mergeResult == "merged"
155+
run: npm run build
156+
130157
- name: Publish npm
158+
if: steps.automerge.outputs.mergeResult == "merged"
131159
env:
132160
VERSION: ${{ steps.version.outputs.result }}
133161
run: |
@@ -137,6 +165,7 @@ jobs:
137165
npx lerna publish from-package --yes --dist-tag dev
138166
139167
- name: Create Github Release for Nightly
168+
if: steps.automerge.outputs.mergeResult == "merged"
140169
uses: ncipollo/release-action@v1
141170
env:
142171
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
@@ -147,7 +176,8 @@ jobs:
147176
prerelease: true
148177
body: 'nightly release'
149178

150-
- name: Notify Sentry.io about the Nightly release#
179+
- name: Notify Sentry.io about the Nightly release
180+
if: steps.automerge.outputs.mergeResult == "merged"
151181
env:
152182
VERSION: ${{ steps.version.outputs.result }}
153183
run: |
@@ -161,12 +191,6 @@ jobs:
161191
sentry-cli releases set-commits $SENTRY_VERSION --auto
162192
sentry-cli releases finalize $SENTRY_VERSION
163193
164-
- name: automerge
165-
uses: "pascalgn/[email protected]"
166-
env:
167-
GITHUB_TOKEN: "${{ secrets.GITHUB_TOKEN }}"
168-
MERGE_METHOD: "squash"
169-
170194
# Deploys the final package to NPM when a versioned tag was pushed
171195
deploy:
172196
needs: [ci]
@@ -180,7 +204,7 @@ jobs:
180204
runs-on: ubuntu-20.04
181205
strategy:
182206
matrix:
183-
node-version: [14]
207+
node-version: [16]
184208

185209
steps:
186210
- name: Checkout code

0 commit comments

Comments
 (0)