-
-
Notifications
You must be signed in to change notification settings - Fork 96
44 lines (44 loc) · 1.75 KB
/
publish-cli.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
name: cli
on:
workflow_dispatch:
schedule:
# run once per hour
- cron: '0 0 * * *'
jobs:
publish:
name: Publish Prisma CLI
runs-on: macos-14
permissions:
pull-requests: write
contents: write
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: 18.x
- name: Publish the latest CLI
run: sh publish-latest.sh
id: publish
working-directory: ./binaries
env:
AWS_DEFAULT_REGION: eu-west-1
AWS_ACCESS_KEY_ID: ${{ secrets.PRISMA_CLI_AWS_ACCESS_KEY_ID }}
AWS_SECRET_ACCESS_KEY: ${{ secrets.PRISMA_CLI_AWS_SECRET_ACCESS_KEY }}
GH_TOKEN: ${{ secrets.GH_TOKEN }}
- name: Create Pull Request
id: pr
if: env.trigger_pr == 'true' # trigger PR only if the publish script ran
uses: peter-evans/create-pull-request@v7
with:
title: 'chore(prisma): upgrade prisma to v${{ steps.publish.outputs.PRISMA_VERSION }}'
body: |
Upgrade prisma to `v${{ steps.publish.outputs.PRISMA_VERSION }}` with engine hash `${{ steps.publish.outputs.PRISMA_HASH }}`.
Full release notes: [v${{ steps.publish.outputs.PRISMA_VERSION }}](https://github.com/prisma/prisma/releases/tag/${{ steps.publish.outputs.PRISMA_VERSION }}).
commit-message: 'chore(prisma): upgrade prisma to v${{ steps.publish.outputs.PRISMA_VERSION }}'
token: ${{ secrets.GH_TOKEN }}
- name: Enable auto-squash
if: ${{ steps.pr.outputs.pull-request-number }}
run: gh pr merge --auto --squash "${{ steps.pr.outputs.pull-request-number }}"
env:
PR_URL: ${{ github.event.pull_request.html_url }}
GITHUB_TOKEN: ${{ secrets.GH_TOKEN }}