-
Notifications
You must be signed in to change notification settings - Fork 0
39 lines (36 loc) · 1.13 KB
/
cd.yml
File metadata and controls
39 lines (36 loc) · 1.13 KB
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
38
39
name: cd
on:
workflow_dispatch:
inputs:
version:
type: choice
description: 'patch | minor | major'
required: true
options:
- patch
- minor
- major
jobs:
release:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v6
- uses: swiftty/nextversion@v0.0.1
id: nextversion
with:
bump: ${{ github.event.inputs.version }}
- name: git settings
run: |
# https://qiita.com/thaim/items/3d1a4d09ec4a7d8844ce
git config --local user.name "github-actions[bot]"
git config --local user.email "41898282+github-actions[bot]@users.noreply.github.com"
- name: update README
run: |
sed -i -E 's/from: \"(0|[1-9][0-9]*)\.(0|[1-9][0-9]*)\.(0|[1-9][0-9]*)\"/from: \"${{ steps.nextversion.outputs.next }}\"/g' README.md
git add README.md
git commit -m 'update README.md'
git push origin main
- uses: softprops/action-gh-release@v3
with:
generate_release_notes: true
tag_name: ${{ steps.nextversion.outputs.next }}