aboutsummaryrefslogtreecommitdiff
path: root/.github/workflows/release.yml
blob: c6fd63979422aaeb5eab4b4fc94abad1c9e10413 (plain) (blame)
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
name: Release

on:
  push:
    branches: [main]

jobs:
  Release:
    runs-on: ubuntu-latest
    permissions:
      contents: write
    steps:
      - name: Checkout source
        uses: actions/checkout@v2
      - name: Go Semantic Release
        uses: go-semantic-release/action@v1.17.0
        id: semrel
        with:
          github-token: ${{ secrets.GITHUB_TOKEN }}
          changelog-file: "CHANGELOG.md"
          changelog-generator-opt: "emojis=true"
          force-bump-patch-version: true
          prepend: true
      - name: Update Version file
        uses: DamianReeves/write-file-action@v1.0
        with:
          path: VERSION.txt
          write-mode: overwrite
          contents: ${{steps.semrel.outputs.version}}
      - name: Git Commit Changelog
        uses: stefanzweifel/git-auto-commit-action@v4.14.1
        with:
          commit_message: "docs(changelog): update cl & ver after release"
          file_pattern: CHANGELOG.md VERSION.txt