Docs improvements
I created a new go project with the following workflow to play around
name: Release on push on main branch
on:
push:
branches:
- 'main'
jobs:
release-on-push-on-main-branch:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v3
with:
fetch-depth: 0
- name: Release
uses: go-semantic-release/action@v1
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
changelog-file: "CHANGELOG.md"
For now that's it, I'm just pushing to the main branch to see what it does :)
Unfortunately I'm struggling with the docs:
- I couldn't find a
v2action ( tried it in the workflow but Github couldn't find it ) which is mentioned at https://github.com/go-semantic-release/semantic-release#plugin-system - The arguments ( https://github.com/go-semantic-release/action#arguments ) need examples or at least datatypes. Does
changelog-fileexpecttrue,CHANGELOG.mdor ( the correct one )"CHANGELOG.md"? I think it would be nice to passtrueto the action if you want that changelog file and the default name is similiar to the semantic-release npm package. But you can change the name if you want. - The workflow above does not generate a changelog. I would expect a "semantic-release" bot to create a file and push changes to it
- Does go-semantic-release prefer npm projects? I'm asking this because the docs provide an example for npm projects https://github.com/go-semantic-release/action#example-ciyml-for-an-npm-package and the action logged
[go-semantic-release]: warning: file update plugins found but no files marked for update. You may be missing the update flag, e.g. --update package.json
Thanks in advance
@jtuchel were you able to generate changelog.md file ? If yes, with which setup ?
Hi @jtuchel, thanks for trying out go-semantic-release and sorry for the late reply!
I couldn't find a v2 action ( tried it in the workflow but Github couldn't find it ) which is mentioned at https://github.com/go-semantic-release/semantic-release#plugin-system
The go-semantic-release action always installs the latest version of go-semantic-release. I understand that this is not obvious, so I clarified it now in the README:
"This action always installs the latest release of go-semantic-release. Thus, the version of this repository is not linked to the used go-semantic-release version."
The arguments ( https://github.com/go-semantic-release/action#arguments ) need examples or at least datatypes. Does changelog-file expect true, CHANGELOG.md or ( the correct one ) "CHANGELOG.md"? I think it would be nice to pass true to the action if you want that changelog file and the default name is similiar to the semantic-release npm package. But you can change the name if you want.
I agree, would you like to contribute this?
The workflow above does not generate a changelog. I would expect a "semantic-release" bot to create a file and push changes to it
Pushing back changes is not part of go-semantic-release yet, but a hooks plugin that takes care of this would be nice.
For now, you can combine go-semantic-release with the github-push-action .
Does go-semantic-release prefer npm projects? I'm asking this because the docs provide an example for npm projects https://github.com/go-semantic-release/action#example-ciyml-for-an-npm-package and the action logged
This has historical reasons; when I started building this tool in 2015, it aimed to be a direct replacement of for original JavaScript semantic-release implmentation (which was abandoned at this time). Today it still supports publishing npm packages, but it is not the main use-case of this tool anymore.
Best, Chris
hi @christophwitzko , how current situation look like ? I am using gitlab, I was using semantic release with plugin to update few files and commit it back with release message. does go-semantic-release support sth like this ?