diff --git a/generate.yml b/generate.yml index 545939c..cead446 100755 --- a/generate.yml +++ b/generate.yml @@ -152,10 +152,14 @@ - source: gitlab-ci.yml dest: .gitlab-ci.yml - source: requirements.txt - - source: requirements2png.yml - dest: .github/workflows/requirements2png.yml - - source: FUNDING.yml - dest: .github/FUNDING.yml + # - source: requirements2png.yml + # dest: .github/workflows/requirements2png.yml + # - source: FUNDING.yml + # dest: .github/FUNDING.yml + - source: semrelrc + dest: .semrelrc + - source: go-semantic-release.yml + dest: .github/workflows/go-semantic-release.yml loop_control: label: "{{ item.source }}" diff --git a/templates/go-semantic-release.yml.j2 b/templates/go-semantic-release.yml.j2 new file mode 100644 index 0000000..22b6a41 --- /dev/null +++ b/templates/go-semantic-release.yml.j2 @@ -0,0 +1,25 @@ +--- +{{ ansible_managed | comment }} + +name: Create a semantic release on push to main + +on: + push: + branches: + - "main" + +# If a 403 error occurs, make sure to set content permission to write +# see: https://github.com/go-semantic-release/action/issues/27 +permissions: + contents: write + +jobs: + release: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v2 + - uses: go-semantic-release/action@v1 + id: semrel + with: + github-token: {% raw %}${{ secrets.GITHUB_TOKEN }}{% endraw %} + changelog-generator-opt: "emojis=true" diff --git a/templates/semrelrc.j2 b/templates/semrelrc.j2 new file mode 100644 index 0000000..c005655 --- /dev/null +++ b/templates/semrelrc.j2 @@ -0,0 +1,19 @@ +{ + "plugins": { + "commit-analyzer": { + "name": "default@^1.0.0" + }, + "ci-condition": { + "name": "default" + }, + "changelog-generator": { + "name": "default", + "options": { + "emojis": "true" + } + }, + "provider": { + "name": "github" + } + } +}