cli #471
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 }} |