Skip to content

Commit

Permalink
Merge pull request #173 from gonzolino/workflows
Browse files Browse the repository at this point in the history
Update workflows
  • Loading branch information
gonzolino authored Jan 26, 2025
2 parents 420aff0 + 5ac0e30 commit b1cecd7
Show file tree
Hide file tree
Showing 6 changed files with 61 additions and 125 deletions.
20 changes: 0 additions & 20 deletions .deepsource.toml

This file was deleted.

38 changes: 0 additions & 38 deletions .github/mergify.yml

This file was deleted.

20 changes: 20 additions & 0 deletions .github/release-drafter.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
name-template: v$RESOLVED_VERSION
tag-template: v$RESOLVED_VERSION

version-resolver:
major:
labels:
- breaking
minor:
labels:
- enhancement
patch:
labels:
- bug
- dependencies
default: minor

template: |
## What’s Changed
$CHANGES
30 changes: 30 additions & 0 deletions .github/workflows/dependabot.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
name: Dependabot

on:
pull_request:

jobs:
auto-merge:
name: Auto-merge
runs-on: ubuntu-latest
permissions:
pull-requests: write
if: github.event.pull_request.user.login == 'dependabot[bot]'
steps:
- run: gh pr merge --auto --merge "${{ github.event.pull_request.html_url }}"
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
approve:
name: Approve
runs-on: ubuntu-latest
permissions:
pull-requests: write
if: github.event.pull_request.user.login == 'dependabot[bot]'
steps:
- id: metadata
uses: dependabot/fetch-metadata@d7267f607e9d3fb96fc2fbe83e0af444713e90b7 # v2.3.0
# Approve the PR if the update type is a patch or minor version update
- if: contains(fromJson('["version-update:semver-patch", "version-update:semver-minor"]'), steps.metadata.outputs.update-type)
run: gh pr review --approve "${{ github.event.pull_request.html_url }}"
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
37 changes: 11 additions & 26 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,33 +5,18 @@ on:
branches:
- main

permissions:
contents: read

jobs:
release-please:
name: Release Please
outputs:
release_created: ${{ steps.release-please.outputs.release_created }}
runs-on: ubuntu-latest
steps:
- id: release-please
uses: google-github-actions/[email protected]
with:
token: ${{ secrets.PERSONAL_GITHUB_TOKEN }}
release-type: go
package-name: gotado
label:
if: ${{ needs.release-please.outputs.release_created }}
name: Label PR
needs: release-please
draft:
name: Draft Release
runs-on: ubuntu-latest

env:
GITHUB_TOKEN: ${{ secrets.PERSONAL_GITHUB_TOKEN }}
permissions:
contents: write
pull-requests: read

steps:
- uses: actions/checkout@v4
- name: Get PR number
id: pr
run: |
echo "pr_number=$(gh pr list --state merged --label 'autorelease: tagged' --json number --jq '.[0].number')" >> $GITHUB_OUTPUT
- run: "gh pr edit ${{ steps.pr.outputs.pr_number }} --remove-label 'autorelease: tagged'"
- run: "gh pr edit ${{ steps.pr.outputs.pr_number }} --add-label 'autorelease: published'"
- uses: release-drafter/release-drafter@b1476f6e6eb133afa41ed8589daba6dc69b4d3f5 # v6.1.0
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
41 changes: 0 additions & 41 deletions .github/workflows/review.yml

This file was deleted.

0 comments on commit b1cecd7

Please sign in to comment.