From d0bdacb4285dedb41545729676ee3c901ea7875d Mon Sep 17 00:00:00 2001 From: skyjebus Date: Fri, 10 Nov 2023 16:26:52 -0500 Subject: [PATCH] Update Dependabot configuration and add a new workflow for auto-releasing and tagging. Also, add a workflow for autofilling PR descriptions. Rename the logo file. These changes were made to improve the automation and organization of the repository. --- .github/dependabot.yml | 15 +++--- .github/workflows/auto-release.yml | 45 ++++++++++++++++++ .github/workflows/dependabot-auto-pr.yml | 2 +- .../workflows/openai-auto-pr-description.yml | 13 +++++ images/{spraytex-logo.png => logo.png} | Bin 5 files changed, 66 insertions(+), 9 deletions(-) create mode 100644 .github/workflows/auto-release.yml create mode 100644 .github/workflows/openai-auto-pr-description.yml rename images/{spraytex-logo.png => logo.png} (100%) diff --git a/.github/dependabot.yml b/.github/dependabot.yml index 000d73e..514304a 100644 --- a/.github/dependabot.yml +++ b/.github/dependabot.yml @@ -1,11 +1,10 @@ -# To get started with Dependabot version updates, you'll need to specify which -# package ecosystems to update and where the package manifests are located. -# Please see the documentation for all configuration options: -# https://docs.github.com/github/administering-a-repository/configuration-options-for-dependency-updates - version: 2 updates: - - package-ecosystem: "npm" # See documentation for possible values - directory: "/" # Location of package manifests + - package-ecosystem: npm + directory: '/' schedule: - interval: "daily" + interval: daily + - package-ecosystem: 'github-actions' + directory: '/' + schedule: + interval: 'daily' diff --git a/.github/workflows/auto-release.yml b/.github/workflows/auto-release.yml new file mode 100644 index 0000000..140063a --- /dev/null +++ b/.github/workflows/auto-release.yml @@ -0,0 +1,45 @@ +name: Auto Tag and Release + +on: + push: + pull_request: + types: [closed] + branches: + - main + +jobs: + release: + if: github.event.pull_request.merged == true + runs-on: ubuntu-22.04 + permissions: + contents: write + steps: + - uses: actions/checkout@v4 + with: + ref: ${{ github.event.pull_request.merge_commit_sha }} + fetch-depth: '0' + + - name: Bump version and push tag + id: bump_version + uses: anothrNick/github-tag-action@1.67.0 + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + DEFAULT_BUMP: patch + WITH_V: true + RELEASE_BRANCHES: main + + - name: Create GitHub Release + if: steps.bump_version.outputs.new_tag + uses: actions/create-release@v1 + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + with: + tag_name: ${{ steps.bump_version.outputs.new_tag }} + release_name: Release ${{ steps.bump_version.outputs.new_tag }} + body: | + Changes in this Release: + + ${{ github.event.pull_request.title }} + ${{ github.event.pull_request.body }} + draft: false + prerelease: false diff --git a/.github/workflows/dependabot-auto-pr.yml b/.github/workflows/dependabot-auto-pr.yml index ca02cc5..f179094 100644 --- a/.github/workflows/dependabot-auto-pr.yml +++ b/.github/workflows/dependabot-auto-pr.yml @@ -34,4 +34,4 @@ jobs: run: gh pr merge --auto --squash "$PR_URL" env: PR_URL: ${{ github.event.pull_request.html_url }} - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} \ No newline at end of file + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} diff --git a/.github/workflows/openai-auto-pr-description.yml b/.github/workflows/openai-auto-pr-description.yml new file mode 100644 index 0000000..f189e47 --- /dev/null +++ b/.github/workflows/openai-auto-pr-description.yml @@ -0,0 +1,13 @@ +name: Autofill PR description + +on: pull_request + +jobs: + openai-pr-description: + runs-on: ubuntu-22.04 + + steps: + - uses: platisd/openai-pr-description@master + with: + github_token: ${{ secrets.GITHUB_TOKEN }} + openai_api_key: ${{ secrets.OPENAI_API_KEY }} diff --git a/images/spraytex-logo.png b/images/logo.png similarity index 100% rename from images/spraytex-logo.png rename to images/logo.png