Skip to content

Commit

Permalink
DEBT: Added Go Releaser footer and Nano ID collision time calculator. (
Browse files Browse the repository at this point in the history
  • Loading branch information
mprimeaux authored Oct 29, 2024
1 parent 7de8201 commit 413a502
Show file tree
Hide file tree
Showing 2 changed files with 50 additions and 9 deletions.
4 changes: 0 additions & 4 deletions .github/workflows/release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@ on:
workflow_dispatch:
push:
tags: ['v*']
# tags: ['*']

permissions:
contents: write
Expand All @@ -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
Expand Down Expand Up @@ -57,4 +54,3 @@ jobs:
args: release --clean ${{ env.flags }}
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

55 changes: 50 additions & 5 deletions .goreleaser.yaml
Original file line number Diff line number Diff line change
@@ -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/).

0 comments on commit 413a502

Please sign in to comment.