From d5f5f191b689570672435aadb152d65b1ce5412a Mon Sep 17 00:00:00 2001 From: d1onys1us <13951458+d1onys1us@users.noreply.github.com> Date: Wed, 15 May 2024 23:51:46 -0400 Subject: [PATCH] ci: add release please and remove old workflow (#250) --- .github/workflows/openai-review.yml | 36 ---------------------------- .github/workflows/release-please.yml | 18 ++++++++++++++ 2 files changed, 18 insertions(+), 36 deletions(-) delete mode 100644 .github/workflows/openai-review.yml create mode 100644 .github/workflows/release-please.yml diff --git a/.github/workflows/openai-review.yml b/.github/workflows/openai-review.yml deleted file mode 100644 index 25d3c99cf7..0000000000 --- a/.github/workflows/openai-review.yml +++ /dev/null @@ -1,36 +0,0 @@ -on: [pull_request] - -jobs: - add_pr_comment: - permissions: write-all - runs-on: ubuntu-latest - name: OpenAI PR Comment - if: "contains(github.event.pull_request.labels.*.name, 'option.review-by-ai')" - steps: - - uses: actions/checkout@v3 - with: - ref: ${{ github.event.pull_request.head.sha }} - fetch-depth: 2 - - id: patch - run: | - patch_output=$(curl --silent --request GET \ - --url https://api.github.com/repos/$PATCH_REPO/pulls/$PATCH_PR \ - --header "Accept: application/vnd.github.v3.patch" \ - --header "Authorization: Bearer $PATCH_GITHUB_TOKEN") - echo $patch_output - echo "GIT_PATCH_OUTPUT=$(echo $patch_output)" >> $GITHUB_ENV - env: - PATCH_GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - PATCH_PR: ${{ github.event.pull_request.number }} - PATCH_REPO: ${{ github.repository }} - - id: review - uses: taikoxyz/openai-review-action@main - with: - GIT_COMMIT_HASH: ${{ github.event.pull_request.head.sha }} - GIT_PATCH_OUTPUT: ${{ env.GIT_PATCH_OUTPUT }} - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - OPENAI_API_KEY: ${{ secrets.OPENAI_API_KEY }} - OPENAI_ORG_KEY: ${{ secrets.OPENAI_ORG_KEY }} - PR_NUMBER: ${{ github.event.pull_request.number }} - PR_TITLE: ${{ github.event.pull_request.title }} - REPOSITORY_NAME: ${{ github.repository }} diff --git a/.github/workflows/release-please.yml b/.github/workflows/release-please.yml new file mode 100644 index 0000000000..b7e1678639 --- /dev/null +++ b/.github/workflows/release-please.yml @@ -0,0 +1,18 @@ +name: Release Please + +on: + push: + branches: + - taiko + +permissions: + contents: write + pull-requests: write + +jobs: + release-please: + runs-on: ubuntu-latest + steps: + - uses: googleapis/release-please-action@v4 + with: + release-type: simple