@@ -108,31 +108,28 @@ jobs:
108
108
cd packages/controller/test/redis-sentinel
109
109
./test-sentinel.sh
110
110
111
- debug :
112
- runs-on : ubuntu-latest
113
- steps :
114
- - name : debug
115
- run : |
116
- echo ${{ github.event_name }}
117
- echo ${{ github.event.pull_request.user.login }}
118
- echo ${{ contains( github.event.pull_request.labels.*.name, 'automated pr') }}
119
- echo ${{ github.event.pull_request.base.ref }}
120
-
121
111
auto-merge :
122
112
if : |
123
113
always() &&
124
114
github.event_name == 'pull_request' &&
125
115
github.event.pull_request.user.login == 'foxriver76' &&
126
- contains( github.event.pull_request.labels.*.name, 'automated pr') &&
127
- github.event.pull_request.base.ref == 'refs/heads/master'
116
+ github.event.pull_request.base.ref == 'master' &&
117
+ startsWith( github.event.pull_request.title, '[NIGHTLY DEV RELEASE]')
128
118
129
119
needs : [ ci ]
130
120
runs-on : ubuntu-latest
131
121
steps :
122
+ - name : Determine version
123
+ id : version
124
+ uses : actions/github-script@v6
125
+ with :
126
+ result-encoding : string
127
+ script : |
128
+ return require(`${process.env.GITHUB_WORKSPACE}/lerna.json`).version;
129
+
132
130
- name : Publish npm
133
- if : steps.automerge.outputs.mergeResult == 'merged'
134
131
env :
135
- VERSION : ${{ github.event.pull_request.title }}
132
+ VERSION : ${{ steps.version.outputs.result }}
136
133
run : |
137
134
npm config set //registry.npmjs.org/:_authToken=${{ secrets.NPM_TOKEN }}
138
135
npm whoami
@@ -141,32 +138,18 @@ jobs:
141
138
142
139
- name : Create Github Release for Nightly
143
140
uses : ncipollo/release-action@v1
144
- if : steps.automerge.outputs.mergeResult == 'merged'
145
- env :
146
- GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
147
- with :
148
- tag : v${{ github.event.pull_request.title }}
149
- name : Release v${{ github.event.pull_request.title }}
150
- draft : false
151
- prerelease : true
152
- body : ' nightly release'
153
-
154
- - name : Create Github Release for Nightly
155
- uses : ncipollo/release-action@v1
156
- if : steps.automerge.outputs.mergeResult == 'merged'
157
141
env :
158
142
GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
159
143
with :
160
- tag : v${{ github.event.pull_request.title }}
161
- name : Release v${{ github.event.pull_request.title }}
144
+ tag : v${{ steps.version.outputs.result }}
145
+ name : Release v${{ steps.version.outputs.result }}
162
146
draft : false
163
147
prerelease : true
164
148
body : ' nightly release'
165
149
166
150
- name : Notify Sentry.io about the Nightly release#
167
- if : steps.automerge.outputs.mergeResult == 'merged'
168
151
env :
169
- VERSION : ${{ github.event.pull_request.title }}
152
+ VERSION : ${{ steps.version.outputs.result }}
170
153
run : |
171
154
npm i -g @sentry/cli
172
155
export SENTRY_AUTH_TOKEN=${{ secrets.SENTRY_AUTH_TOKEN }}
0 commit comments