Skip to content

Commit

Permalink
[github-actions] Automatic tag
Browse files Browse the repository at this point in the history
  • Loading branch information
gi-wg2 committed Sep 4, 2024
1 parent 4b9f765 commit 02d0680
Showing 1 changed file with 11 additions and 7 deletions.
18 changes: 11 additions & 7 deletions .github/workflows/automatic-release.yml
Original file line number Diff line number Diff line change
@@ -1,16 +1,16 @@
name: Automatic Release on Push

on:
push:
tags:
- '*'
pull_request:
types:
- closed

jobs:
automatic-release:
if: github.event.pull_request.merged == true
runs-on: ubuntu-latest
permissions:
contents: read
packages: write
contents: write

steps:
- name: Check out repository
Expand All @@ -36,13 +36,17 @@ jobs:
yq eval-all 'select(fileIndex == 0) * select(fileIndex == 1)' gen/openapi.yaml templates/openapi.base.yaml > openapi.yaml
- name: Push to Buf Schema Registry
if: startsWith(github.ref, 'refs/tags/')
run: buf push

- name: Bump version and push tag
uses: anothrNick/github-tag-action@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

- name: Release
uses: softprops/action-gh-release@v2
if: startsWith(github.ref, 'refs/tags/')
with:
token: ${{ secrets.GITHUB_TOKEN }}
make_latest: true
body: |
Automatic release of the OpenAPI spec and the Buf image
Expand Down

0 comments on commit 02d0680

Please sign in to comment.