Skip to content

Commit

Permalink
ci: add published tag after publishing
Browse files Browse the repository at this point in the history
Release-As: 1.3.3
  • Loading branch information
majori committed Feb 5, 2024
1 parent bd44b67 commit 11cd626
Showing 1 changed file with 24 additions and 1 deletion.
25 changes: 24 additions & 1 deletion .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,9 +24,10 @@ jobs:
pull-requests: write
outputs:
release_created: ${{ steps.release.outputs.release_created }}
issue_number: ${{ steps.release.outputs.pr.number }}
runs-on: ubuntu-latest
steps:
- uses: google-github-actions/release-please-action@v3
- uses: google-github-actions/release-please-action@v4
id: release
with:
release-type: go
Expand Down Expand Up @@ -75,3 +76,25 @@ jobs:
HOMEBREW_TAP_PRIVATE_KEY: ${{ secrets.HOMEBREW_TAP_PRIVATE_KEY }}
WINGET_PKGS_PRIVATE_KEY: ${{ secrets.WINGET_PKGS_PRIVATE_KEY }}
SLACK_WEBHOOK: ${{ secrets.SLACK_WEBHOOK }}

# Add the "autorelease: published" and remove tagged, this allows
# monitoring to be enabled that detects failed releases:
- uses: actions/github-script@v4
id: untag-release
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
script: |
const [owner, repo] = process.env.GITHUB_REPOSITORY.split('/');
await github.issues.addLabels({
owner,
repo,
issue_number: ${{ needs.release.outputs.issue_number }},
labels: ['autorelease: published']
});
github.issues.removeLabel({
owner,
repo,
issue_number: ${{ needs.release.outputs.issue_number }},
name: 'autorelease: tagged',
});
console.log(`Tagged ${{ needs.release.outputs.issue_number }}`)

0 comments on commit 11cd626

Please sign in to comment.