-
Notifications
You must be signed in to change notification settings - Fork 1
37 lines (34 loc) · 1.41 KB
/
release.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
on:
push:
branches:
- main
permissions:
contents: write
pull-requests: write
name: Handle release
jobs:
release-please:
runs-on: ubuntu-latest
steps:
- name: create new release
uses: googleapis/release-please-action@v4
id: release
with:
# this assumes that you have created a personal access token
# (PAT) and configured it as a GitHub action secret named
# `MY_RELEASE_PLEASE_TOKEN` (this secret name is not important).
# token: ${{ secrets.MY_RELEASE_PLEASE_TOKEN }}
# this is a built-in strategy in release-please, see "Action Inputs"
# for more options
release-type: simple
- uses: actions/checkout@v4
if: ${{ steps.release.outputs.release_created }}
- name: update README.md
if: ${{ steps.release.outputs.release_created }}
run: |
sed -i 's/Current version: .*/Current version: ${{ steps.release.outputs.major }}.${{ steps.release.outputs.minor }}.${{ steps.release.outputs.patch }}/' README.md
- name: commit updated README.md
if: ${{ steps.release.outputs.release_created }}
uses: stefanzweifel/git-auto-commit-action@v5
with:
commit_message: "chore: update version in README to ${{ steps.release.outputs.major }}.${{ steps.release.outputs.minor }}.${{ steps.release.outputs.patch }}"