Skip to content

Commit

Permalink
chore: update some for gh release action
Browse files Browse the repository at this point in the history
  • Loading branch information
inhere committed Aug 12, 2022
1 parent ab40d42 commit ef375a6
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 15 deletions.
9 changes: 5 additions & 4 deletions .github/changelog.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,8 @@ title: '## Change Log'
style: gh-release
# group names
names: [Refactor, Fixed, Feature, Update, Other]
#repo_url: https://github.com/gookit/ini
# if empty will auto fetch by git remote
#repo_url: https://github.com/gookit/goutil

filters:
# message length should >= 12
Expand All @@ -30,7 +31,7 @@ rules:
contains: ['fix:']
- name: Feature
start_withs: [feat, new]
contains: [feature]
contains: [feature, 'feat:']
- name: Update
start_withs: [update, 'up:']
contains: []
start_withs: [up]
contains: ['update:', 'up:']
15 changes: 4 additions & 11 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,21 +12,13 @@ jobs:
timeout-minutes: 10
strategy:
fail-fast: true
matrix:
go_version: [1.17]

steps:
- name: Checkout
uses: actions/checkout@v3
with:
fetch-depth: 0

- name: Setup Go Faster
uses: WillAbides/setup-go-faster@v1.7.0
timeout-minutes: 3
with:
go-version: ${{ matrix.go_version }}

- name: Setup ENV
# https://docs.github.com/en/free-pro-team@latest/actions/reference/workflow-commands-for-github-actions#setting-an-environment-variable
run: |
Expand All @@ -35,8 +27,9 @@ jobs:
- name: Generate changelog
run: |
go install github.com/gookit/gitw/cmd/chlog@latest
chlog -config .github/changelog.yml -output testdata/changelog.md prev last
curl https://github.com/gookit/gitw/releases/latest/download/chlog-linux-amd64 -L -o /usr/local/bin/chlog
chmod a+x /usr/local/bin/chlog
chlog -c .github/changelog.yml -o changelog.md prev last
# https://github.com/softprops/action-gh-release
- name: Create release and upload assets
Expand All @@ -46,6 +39,6 @@ jobs:
with:
name: ${{ env.RELEASE_TAG }}
tag_name: ${{ env.RELEASE_TAG }}
body_path: testdata/changelog.md
body_path: changelog.md
token: ${{ secrets.GITHUB_TOKEN }}
# files: macos-chlog.exe

0 comments on commit ef375a6

Please sign in to comment.