Merge pull request #151 from gonzolino/dependabot/go_modules/golang.o… #126
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: Release | |
on: | |
push: | |
branches: | |
- main | |
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 | |
runs-on: ubuntu-latest | |
env: | |
GITHUB_TOKEN: ${{ secrets.PERSONAL_GITHUB_TOKEN }} | |
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'" |