Skip to content

Commit ac1cc5a

Browse files
committed
chore: add proper changelog generation
1 parent c154787 commit ac1cc5a

File tree

1 file changed

+15
-23
lines changed

1 file changed

+15
-23
lines changed

.github/workflows/go.yml

Lines changed: 15 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,11 @@ jobs:
1313
go-version: 1.13
1414
id: go
1515

16+
- name: Use Node.js 12.x
17+
uses: actions/setup-node@v1
18+
with:
19+
node-version: 12.x
20+
1621
- name: Extract branch name
1722
shell: bash
1823
run: echo "##[set-output name=branch;]$(echo ${GITHUB_REF#refs/heads/})"
@@ -38,28 +43,15 @@ jobs:
3843
GOOS=windows GOARCH=amd64 go build -v -o ${GITHUB_REPOSITORY##*/}-win32-x64 ./...
3944
GOOS=windows GOARCH=386 go build -v -o ${GITHUB_REPOSITORY##*/}-win32-ia32 ./...
4045
GOOS=darwin GOARCH=amd64 go build -v -o ${GITHUB_REPOSITORY##*/}-darwin-x64 ./...
41-
42-
- name: Create a Release
43-
id: create_release
44-
uses: actions/create-release@v1
45-
env:
46-
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
47-
with:
48-
tag_name: ${{ steps.extract_branch.outputs.branch }}
49-
release_name: ${{ steps.extract_branch.outputs.branch }}
50-
draft: false
51-
prerelease: false
5246
53-
- name: Upload a Release Asset
54-
uses: actions/[email protected]
55-
env:
56-
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
47+
- name: Generate changelog
48+
run: |
49+
npm install -g conventional-changelog-cli
50+
conventional-changelog -p angular -i CHANGELOG.md -s -r 0 -v
51+
52+
- uses: ncipollo/release-action@v1
5753
with:
58-
# The URL for uploading assets to the release
59-
upload_url: ${{ steps.create_release.outputs.upload_url }}
60-
# The path to the asset you want to upload
61-
asset_path: ${{ steps.extract_repo.outputs.repo }}-linux-x64
62-
# The name of the asset you want to upload
63-
asset_name: ${{ steps.extract_repo.outputs.repo }}-linux-x64
64-
# The content-type of the asset you want to upload. See the supported Media Types here: https://www.iana.org/assignments/media-types/media-types.xhtml for more information
65-
asset_content_type: application/x-elf
54+
artifacts: ${{ steps.extract_repo.outputs.repo }}-*
55+
bodyFile: "CHANGELOG.md"
56+
token: ${{ secrets.GITHUB_TOKEN }}
57+

0 commit comments

Comments
 (0)