Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@ name: Main

on:
push:
branches: [master]
branches: [v2.x]
pull_request:
branches: [master]
branches: [v2.x]

jobs:
main:
Expand Down
17 changes: 16 additions & 1 deletion .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ name: Release

on:
push:
branches: [master]
branches: [v2.x]

permissions:
contents: read
Expand All @@ -12,6 +12,7 @@ jobs:
runs-on: ubuntu-latest
outputs:
releases_created: ${{ steps.release.outputs.releases_created }}
tag_name: ${{ steps.release.outputs.tag_name }}
steps:
- uses: googleapis/release-please-action@v4
id: release
Expand All @@ -20,6 +21,20 @@ jobs:
config-file: release-please-config.json
manifest-file: .release-please-manifest.json

# GitHub marks the most recently created release as "Latest" by default,
# so a maintenance release cut here would steal the badge from the v3 line.
unmark-latest:
needs: release-please
if: needs.release-please.outputs.releases_created == 'true'
runs-on: ubuntu-latest
steps:
- name: Unmark this release as latest
env:
GH_TOKEN: ${{ secrets.BOT_PAT }}
run: |
release_id=$(gh api "repos/${{ github.repository }}/releases/tags/${{ needs.release-please.outputs.tag_name }}" --jq .id)
gh api -X PATCH "repos/${{ github.repository }}/releases/$release_id" -f make_latest=false

publish:
needs: release-please
if: needs.release-please.outputs.releases_created == 'true'
Expand Down
1 change: 1 addition & 0 deletions release-please-config.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
{
"$schema": "https://raw.githubusercontent.com/googleapis/release-please/main/schemas/config.json",
"release-type": "simple",
"versioning-strategy": "always-bump-patch",
"include-v-in-tag": true,
"include-component-in-tag": false,
"bump-minor-pre-major": false,
Expand Down
Loading