Skip to content

Commit c297a26

Browse files
committed
docs: add examples folder
1 parent 8983eb2 commit c297a26

1 file changed

Lines changed: 39 additions & 0 deletions

File tree

examples/bump-release.yaml

Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
on:
2+
push:
3+
branches:
4+
- main
5+
6+
jobs:
7+
bump:
8+
runs-on: ubuntu-latest
9+
permissions:
10+
contents: write
11+
actions: write
12+
steps:
13+
- uses: actions/checkout@v5
14+
with:
15+
fetch-depth: 0
16+
fetch-tags: true
17+
- name: Set up git config
18+
run: |
19+
git config --global user.name "github-actions[bot]"
20+
git config --global user.email "41898282+github-actions[bot]@users.noreply.github.com"
21+
- uses: actions/setup-cz@main
22+
- id: bump-version
23+
run: |
24+
cz bump --yes --annotated-tag
25+
git push --follow-tags
26+
current_version="$(cz version -p --current)" # ATTENTION: You may have to add the v* at the beginning of the version
27+
echo "current_version=$current_version" >> $GITHUB_OUTPUT
28+
- name: Build changelog for Release
29+
env:
30+
CURRENT_VERSION: ${{ steps.bump-version.outputs.current_version }}
31+
run: |
32+
cz changelog --dry-run "${CURRENT_VERSION}" > .changelog.md
33+
- name: Release
34+
uses: softprops/action-gh-release@v2
35+
with:
36+
body_path: ".changelog.md"
37+
tag_name: ${{ steps.bump-version.outputs.current_version }}
38+
env:
39+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

0 commit comments

Comments
 (0)