27
27
required : true
28
28
type : boolean
29
29
default : true
30
+ prerelease :
31
+ description : " true: Create a prerelease. false: Create a stable release"
32
+ required : true
33
+ type : boolean
34
+ default : true
35
+ prerelease_version :
36
+ description : " The prerelease version to release"
37
+ required : false
38
+ type : string
39
+ default : " develop"
30
40
workflow_call :
31
41
inputs :
32
42
prerelease :
61
71
release : ${{ env.RELEASE }}
62
72
steps :
63
73
- name : Check out stable release tag
64
- uses : actions/checkout@v2
74
+ uses : actions/checkout@v4
65
75
if : github.event.inputs.stable_version
66
76
with :
67
77
persist-credentials : false
@@ -70,20 +80,21 @@ jobs:
70
80
- name : Format prerelease ref
71
81
if : inputs.prerelease
72
82
run : |
73
- re='^[0-9]+$'
74
- IFS='.' read -ra version <<< "${{ inputs.prerelease_version }}"
75
- if [[ ${version[0]} =~ $re ]] ; then
76
- echo "PRERELEASE=v$version" >> $GITHUB_ENV
77
- else
78
- echo "PRERELEASE=$version" >> $GITHUB_ENV
79
- fi
83
+ # re='^[0-9]+$'
84
+ # IFS='.' read -ra version <<< "${{ inputs.prerelease_version }}"
85
+ # if [[ ${version[0]} =~ $re ]] ; then
86
+ # echo "PRERELEASE=v$version" >> $GITHUB_ENV
87
+ # else
88
+ # echo "PRERELEASE=$version" >> $GITHUB_ENV
89
+ # fi
90
+ echo "PRERELEASE=${{ github.event.inputs.prerelease_version }}" >> $GITHUB_ENV
80
91
- name : Check out prerelease tag
81
- uses : actions/checkout@v2
82
- if : inputs.prerelease
92
+ uses : actions/checkout@v4
93
+ if : inputs.prerelease || github.event.inputs.prerelease
83
94
with :
84
95
persist-credentials : false
85
96
fetch-depth : 0
86
- ref : " ${{ env.PRERELEASE }} "
97
+ ref : " pre-release-0.232.0rc1 "
87
98
- name : Generate stable release message
88
99
if : >
89
100
github.event.inputs.stable_version
@@ -134,27 +145,27 @@ jobs:
134
145
token : ${{ secrets.COVALENT_OPS_BOT_TOKEN }}
135
146
tag : ${{ env.RELEASE }}
136
147
prerelease : true
137
- - name : Create stable release
138
- if : >-
139
- github.event.inputs.stable_version
140
- && contains(env.PAUL_BLART, github.actor)
141
- && steps.stable-changelog.outcome == 'success'
142
- && (!github.event.inputs.test_release || github.event.inputs.test_release == 'false')
143
- uses : ncipollo/release-action@v1
144
- with :
145
- body : ${{ steps.stable-changelog.outputs.message }}
146
- token : ${{ secrets.COVALENT_OPS_BOT_TOKEN }}
147
- tag : ${{ env.RELEASE }}
148
- - name : Alert Slack
149
- if : failure()
150
- uses : rtCamp/action-slack-notify@v2
151
- env :
152
- SLACK_CHANNEL : " covalent-ci"
153
- SLACK_USERNAME : " CovalentOpsBot"
154
- SLACK_MESSAGE : " The release.yml workflow is failing in ${{ github.ref }}!"
155
- SLACK_COLOR : ${{ job.status }}
156
- SLACK_TITLE : " :warning: Attention Required :warning:"
157
- SLACK_WEBHOOK : ${{ secrets.SLACK_ALERT_WEBHOOK }}
148
+ # - name: Create stable release
149
+ # if: >-
150
+ # github.event.inputs.stable_version
151
+ # && contains(env.PAUL_BLART, github.actor)
152
+ # && steps.stable-changelog.outcome == 'success'
153
+ # && (!github.event.inputs.test_release || github.event.inputs.test_release == 'false')
154
+ # uses: ncipollo/release-action@v1
155
+ # with:
156
+ # body: ${{ steps.stable-changelog.outputs.message }}
157
+ # token: ${{ secrets.COVALENT_OPS_BOT_TOKEN }}
158
+ # tag: ${{ env.RELEASE }}
159
+ # - name: Alert Slack
160
+ # if: failure()
161
+ # uses: rtCamp/action-slack-notify@v2
162
+ # env:
163
+ # SLACK_CHANNEL: "covalent-ci"
164
+ # SLACK_USERNAME: "CovalentOpsBot"
165
+ # SLACK_MESSAGE: "The release.yml workflow is failing in ${{ github.ref }}!"
166
+ # SLACK_COLOR: ${{ job.status }}
167
+ # SLACK_TITLE: ":warning: Attention Required :warning:"
168
+ # SLACK_WEBHOOK: ${{ secrets.SLACK_ALERT_WEBHOOK }}
158
169
159
170
pypi :
160
171
runs-on : ubuntu-latest
@@ -163,7 +174,7 @@ jobs:
163
174
version : ${{ steps.validate.outputs.version }}
164
175
steps :
165
176
- name : Check out release tag
166
- uses : actions/checkout@v2
177
+ uses : actions/checkout@v4
167
178
with :
168
179
persist-credentials : false
169
180
fetch-depth : 0
@@ -231,134 +242,134 @@ jobs:
231
242
SLACK_TITLE : " :warning: Attention Required :warning:"
232
243
SLACK_WEBHOOK : ${{ secrets.SLACK_ALERT_WEBHOOK }}
233
244
234
- conda :
235
- needs : pypi
236
- runs-on : ubuntu-latest
237
- continue-on-error : true
238
- strategy :
239
- fail-fast : false
240
- matrix :
241
- python-version :
242
- - " 3.8"
243
- - " 3.9"
244
- - " 3.10"
245
- steps :
246
- - name : Check for stable release
247
- if : github.event.inputs.stable_version && !inputs.prerelease
248
- run : echo "STABLE=true" >> $GITHUB_ENV
249
- - name : Conda skeleton publish
250
- uses : AgnostiqHQ/conda-skeleton-publish@main
251
- if : ${{ !github.event.inputs.test_release }}
252
- with :
253
- pypi_package : " covalent"
254
- python_version : ${{ matrix.python-version }}
255
- upload_channel : " agnostiq"
256
- access_token : ${{ secrets.ANACONDA_TOKEN }}
257
- package_version : ${{ needs.pypi.outputs.version }}
258
- stable : ${{ env.STABLE }}
259
- wait : true
260
- - name : Alert Slack
261
- if : failure()
262
- uses : rtCamp/action-slack-notify@v2
263
- env :
264
- SLACK_CHANNEL : " covalent-ci"
265
- SLACK_USERNAME : " CovalentOpsBot"
266
- SLACK_MESSAGE : " The release.yml workflow is failing in ${{ github.ref }}!"
267
- SLACK_COLOR : ${{ job.status }}
268
- SLACK_TITLE : " :warning: Attention Required :warning:"
269
- SLACK_WEBHOOK : ${{ secrets.SLACK_ALERT_WEBHOOK }}
245
+ # conda:
246
+ # needs: pypi
247
+ # runs-on: ubuntu-latest
248
+ # continue-on-error: true
249
+ # strategy:
250
+ # fail-fast: false
251
+ # matrix:
252
+ # python-version:
253
+ # - "3.8"
254
+ # - "3.9"
255
+ # - "3.10"
256
+ # steps:
257
+ # - name: Check for stable release
258
+ # if: github.event.inputs.stable_version && !inputs.prerelease
259
+ # run: echo "STABLE=true" >> $GITHUB_ENV
260
+ # - name: Conda skeleton publish
261
+ # uses: AgnostiqHQ/conda-skeleton-publish@main
262
+ # if: ${{ !github.event.inputs.test_release }}
263
+ # with:
264
+ # pypi_package: "covalent"
265
+ # python_version: ${{ matrix.python-version }}
266
+ # upload_channel: "agnostiq"
267
+ # access_token: ${{ secrets.ANACONDA_TOKEN }}
268
+ # package_version: ${{ needs.pypi.outputs.version }}
269
+ # stable: ${{ env.STABLE }}
270
+ # wait: true
271
+ # - name: Alert Slack
272
+ # if: failure()
273
+ # uses: rtCamp/action-slack-notify@v2
274
+ # env:
275
+ # SLACK_CHANNEL: "covalent-ci"
276
+ # SLACK_USERNAME: "CovalentOpsBot"
277
+ # SLACK_MESSAGE: "The release.yml workflow is failing in ${{ github.ref }}!"
278
+ # SLACK_COLOR: ${{ job.status }}
279
+ # SLACK_TITLE: ":warning: Attention Required :warning:"
280
+ # SLACK_WEBHOOK: ${{ secrets.SLACK_ALERT_WEBHOOK }}
270
281
271
- docker :
272
- runs-on : ubuntu-latest
273
- steps :
274
- - name : Check out release tag
275
- uses : actions/checkout@v2
276
- if : inputs.stable_version
277
- with :
278
- persist-credentials : false
279
- fetch-depth : 0
280
- ref : " v${{ github.event.inputs.stable_version }}"
282
+ # docker:
283
+ # runs-on: ubuntu-latest
284
+ # steps:
285
+ # - name: Check out release tag
286
+ # uses: actions/checkout@v4
287
+ # if: inputs.stable_version
288
+ # with:
289
+ # persist-credentials: false
290
+ # fetch-depth: 0
291
+ # ref: "v${{ github.event.inputs.stable_version }}"
281
292
282
- - name : Check out master
283
- uses : actions/checkout@v2
284
- if : inputs.prerelease
285
- with :
286
- persist-credentials : false
287
- fetch-depth : 0
293
+ # - name: Check out master
294
+ # uses: actions/checkout@v4
295
+ # if: inputs.prerelease
296
+ # with:
297
+ # persist-credentials: false
298
+ # fetch-depth: 0
288
299
289
- - name : Set up QEMU
290
- uses : docker/setup-qemu-action@master
291
- with :
292
- platforms : " linux/amd64,linux/arm64"
300
+ # - name: Set up QEMU
301
+ # uses: docker/setup-qemu-action@master
302
+ # with:
303
+ # platforms: "linux/amd64,linux/arm64"
293
304
294
- - name : Set up Docker Buildx
295
- uses : docker/setup-buildx-action@master
305
+ # - name: Set up Docker Buildx
306
+ # uses: docker/setup-buildx-action@master
296
307
297
- - name : Configure AWS credentials
298
- uses : aws-actions/configure-aws-credentials@v1
299
- with :
300
- role-to-assume : ${{ secrets.ECR_PUBLIC_UPLOAD_ROLE }}
301
- aws-region : us-east-1
308
+ # - name: Configure AWS credentials
309
+ # uses: aws-actions/configure-aws-credentials@v1
310
+ # with:
311
+ # role-to-assume: ${{ secrets.ECR_PUBLIC_UPLOAD_ROLE }}
312
+ # aws-region: us-east-1
302
313
303
- - name : Generate metadata
304
- run : |
305
- aws --version
306
- docker info
307
- TAG="$(cat ./VERSION)"
308
- echo "TAG: $TAG"
309
- echo "TAG=$TAG" >> $GITHUB_ENV
310
- BUILD_DATE=`date -u +%Y-%m-%d`
311
- echo "BUILD_DATE=$BUILD_DATE" >> $GITHUB_ENV
312
- BUILD_VERSION=${{ github.sha }}
313
- echo "BUILD_VERSION=$BUILD_VERSION" >> $GITHUB_ENV
314
+ # - name: Generate metadata
315
+ # run: |
316
+ # aws --version
317
+ # docker info
318
+ # TAG="$(cat ./VERSION)"
319
+ # echo "TAG: $TAG"
320
+ # echo "TAG=$TAG" >> $GITHUB_ENV
321
+ # BUILD_DATE=`date -u +%Y-%m-%d`
322
+ # echo "BUILD_DATE=$BUILD_DATE" >> $GITHUB_ENV
323
+ # BUILD_VERSION=${{ github.sha }}
324
+ # echo "BUILD_VERSION=$BUILD_VERSION" >> $GITHUB_ENV
314
325
315
- - name : Login to Public Registry
316
- run : |
317
- aws ecr-public get-login-password --region us-east-1 | docker login --username AWS --password-stdin public.ecr.aws
326
+ # - name: Login to Public Registry
327
+ # run: |
328
+ # aws ecr-public get-login-password --region us-east-1 | docker login --username AWS --password-stdin public.ecr.aws
318
329
319
- - name : Build and push pre-release
320
- if : >
321
- inputs.prerelease
322
- && !inputs.stable_version
323
- && github.event_name == 'schedule'
324
- uses : docker/build-push-action@v2
325
- with :
326
- builder : ${{ steps.buildx.outputs.name }}
327
- context : .
328
- file : Dockerfile
329
- platforms : linux/amd64
330
- cache-from : type=gha
331
- cache-to : type=gha,mode=max
332
- build-args : |
333
- BUILD_DATE=${{ env.BUILD_DATE }}
334
- BUILD_VERSION=${{ env.BUILD_VERSION }}
335
- push : true
336
- tags : |
337
- public.ecr.aws/covalent/covalent:latest
338
- public.ecr.aws/covalent/covalent:${{ env.TAG }}
330
+ # - name: Build and push pre-release
331
+ # if: >
332
+ # inputs.prerelease
333
+ # && !inputs.stable_version
334
+ # && github.event_name == 'schedule'
335
+ # uses: docker/build-push-action@v2
336
+ # with:
337
+ # builder: ${{ steps.buildx.outputs.name }}
338
+ # context: .
339
+ # file: Dockerfile
340
+ # platforms: linux/amd64
341
+ # cache-from: type=gha
342
+ # cache-to: type=gha,mode=max
343
+ # build-args: |
344
+ # BUILD_DATE=${{ env.BUILD_DATE }}
345
+ # BUILD_VERSION=${{ env.BUILD_VERSION }}
346
+ # push: true
347
+ # tags: |
348
+ # public.ecr.aws/covalent/covalent:latest
349
+ # public.ecr.aws/covalent/covalent:${{ env.TAG }}
339
350
340
- - name : Build and push stable release
341
- if : >
342
- github.event_name == 'workflow_dispatch'
343
- && inputs.stable_version
344
- && !inputs.prerelease
345
- && !github.events.inputs.test_release
346
- && contains(env.PAUL_BLART, github.actor)
347
- uses : docker/build-push-action@v2
348
- with :
349
- builder : ${{ steps.buildx.outputs.name }}
350
- context : .
351
- file : Dockerfile
352
- platforms : linux/amd64
353
- cache-from : type=gha
354
- cache-to : type=gha,mode=max
355
- build-args : |
356
- BUILD_DATE=${{ env.BUILD_DATE }}
357
- BUILD_VERSION=${{ env.BUILD_VERSION }}
358
- push : true
359
- tags : |
360
- public.ecr.aws/covalent/covalent:${{ inputs.stable_version }}
361
- public.ecr.aws/covalent/covalent:stable
351
+ # - name: Build and push stable release
352
+ # if: >
353
+ # github.event_name == 'workflow_dispatch'
354
+ # && inputs.stable_version
355
+ # && !inputs.prerelease
356
+ # && !github.events.inputs.test_release
357
+ # && contains(env.PAUL_BLART, github.actor)
358
+ # uses: docker/build-push-action@v2
359
+ # with:
360
+ # builder: ${{ steps.buildx.outputs.name }}
361
+ # context: .
362
+ # file: Dockerfile
363
+ # platforms: linux/amd64
364
+ # cache-from: type=gha
365
+ # cache-to: type=gha,mode=max
366
+ # build-args: |
367
+ # BUILD_DATE=${{ env.BUILD_DATE }}
368
+ # BUILD_VERSION=${{ env.BUILD_VERSION }}
369
+ # push: true
370
+ # tags: |
371
+ # public.ecr.aws/covalent/covalent:${{ inputs.stable_version }}
372
+ # public.ecr.aws/covalent/covalent:stable
362
373
363
374
# docker_aws_plugins:
364
375
# name: Trigger AWS Plugins Base Executor Image Pre-Release
0 commit comments