diff --git a/.github/workflows/release.yaml b/.github/workflows/release.yaml index eb70421..7206f9c 100644 --- a/.github/workflows/release.yaml +++ b/.github/workflows/release.yaml @@ -5,7 +5,6 @@ on: workflow_dispatch: push: tags: ['v*'] - # tags: ['*'] permissions: contents: write @@ -19,8 +18,6 @@ jobs: flags: "" steps: - if: ${{ !startsWith(github.ref, 'refs/tags/v') }} - # - if: ${{ !startsWith(github.ref, 'refs/tags/') }} - #- if: ${{ startsWith(github.ref, 'refs/tags/') && contains('0123456789', github.ref | slice(10, 11)) }} run: echo "flags=--snapshot" >> $GITHUB_ENV - name: Preamble @@ -57,4 +54,3 @@ jobs: args: release --clean ${{ env.flags }} env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - diff --git a/.goreleaser.yaml b/.goreleaser.yaml index c4c48ef..f170623 100644 --- a/.goreleaser.yaml +++ b/.goreleaser.yaml @@ -1,17 +1,62 @@ +# yaml-language-server: $schema=https://goreleaser.com/static/schema.json +# vim: set ts=2 sw=2 tw=0 fo=jcroql +version: 2 + +snapshot: + version_template: "{{ incpatch .Version }}-alpha" + # Ref: https://goreleaser.com/customization/builds/ +project_name: nanoid + builds: # Ref: https://goreleaser.com/errors/no-main/#if-you-are-building-a-library - skip: true -snapshot: - version_template: "{{ incpatch .Version }}-alpha" - changelog: sort: asc + use: github filters: exclude: - - '^docs:' - - '^test:' + - "^test:" + - "^test\\(" + - "merge conflict" + - Merge pull request + - Merge remote-tracking branch + - Merge branch + - go mod tidy + groups: + - title: Dependency updates + regexp: '^.*?(.+)\(deps\)!?:.+$' + order: 300 + - title: "Features" + regexp: '^.*?feature(\(.+\))??!?:.+$' + order: 100 + - title: "Risk" + regexp: '^.*?risk(\(.+\))??!?:.+$' + order: 150 + - title: "Defects" + regexp: '^.*?defect(\(.+\))??!?:.+$' + order: 200 + - title: "Debt" + regexp: '^.*?debt(\(.+\))??!?:.+$' + order: 250 + - title: "Documentation" + regexp: ^.*?docs?(\(.+\))??!?:.+$ + order: 400 + - title: "Build" + regexp: ^.*?(build|ci)(\(.+\))??!?:.+$ + order: 400 + - title: Other work + order: 9999 + +sboms: + - artifacts: archive release: name_template: 'v{{ .Version }}' + footer: | + **Full Changelog**: https://github.com/sixafter/nanoid/tree/main/CHANGELOG + + ## Where to go next? + + * To determine the practical length for a NanoID, see the collision time calculator [here](https://sixafter.github.io/nanoid/).