Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,17 +2,17 @@ version: 2

updates:

- package-ecosystem: gomod
- package-ecosystem: github-actions
directory: /
schedule:
interval: weekly
open-pull-requests-limit: 0 # only security updates
assignees:
- "thomaslaurenson"

- package-ecosystem: github-actions
- package-ecosystem: gomod
directory: /
schedule:
interval: weekly
open-pull-requests-limit: 0 # only security updates
assignees:
- "thomaslaurenson"
23 changes: 23 additions & 0 deletions .github/workflows/lint.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
name: Lint

on: workflow_call

permissions:
contents: read

jobs:
go_lint:
runs-on: ubuntu-24.04
steps:
- uses: actions/checkout@v6

- uses: actions/setup-go@v6
with:
go-version-file: go.mod
cache: true

- run: make fmt_check

- run: make mod_check

- run: make vet
19 changes: 19 additions & 0 deletions .github/workflows/pr.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
name: PR

on:
pull_request:
types: [opened, synchronize, reopened]

permissions:
contents: read

concurrency:
group: pr-${{ github.event.pull_request.number }}
cancel-in-progress: true

jobs:
lint:
uses: ./.github/workflows/lint.yml

test:
uses: ./.github/workflows/test.yml
54 changes: 0 additions & 54 deletions .github/workflows/push_and_pull.yml

This file was deleted.

35 changes: 35 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
name: Release

on: workflow_call

permissions:
contents: write

jobs:
goreleaser:
runs-on: ubuntu-24.04
steps:
- uses: actions/checkout@v6
with:
fetch-depth: 0 # required by GoReleaser for changelog/versioning

- uses: actions/setup-go@v6
with:
go-version-file: go.mod
cache: true

- name: Extract release notes from CHANGELOG.md
run: |
TAG="${GITHUB_REF_NAME}"
awk "/^## ${TAG} /{found=1; next} found && /^## /{exit} found{print}" CHANGELOG.md \
> /tmp/release-notes.md
if [ ! -s /tmp/release-notes.md ]; then
echo "No CHANGELOG entry found for ${TAG}" >&2
exit 1
fi

- uses: goreleaser/goreleaser-action@v7
with:
args: release --clean --release-notes /tmp/release-notes.md
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
20 changes: 20 additions & 0 deletions .github/workflows/tag.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
name: Tag

on:
push:
tags: ["v*"]

permissions:
contents: write

jobs:
lint:
uses: ./.github/workflows/lint.yml

test:
uses: ./.github/workflows/test.yml

release:
needs: [lint, test]
uses: ./.github/workflows/release.yml
secrets: inherit
76 changes: 0 additions & 76 deletions .github/workflows/tag_and_release.yml

This file was deleted.

19 changes: 19 additions & 0 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
name: Test

on: workflow_call

permissions:
contents: read

jobs:
go_test:
runs-on: ubuntu-24.04
steps:
- uses: actions/checkout@v6

- uses: actions/setup-go@v6
with:
go-version-file: go.mod
cache: true

- run: make test
25 changes: 22 additions & 3 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,11 @@
# CUSTOM
bin/
dist/

# GO
# If you prefer the allow list template instead of the deny list, see community template:
# https://github.com/github/gitignore/blob/main/community/Golang/Go.AllowList.gitignore
#
# Binaries for programs and plugins
*.exe
*.exe~
Expand All @@ -8,11 +16,22 @@
# Test binary, built with `go test -c`
*.test

# Output of the go coverage tool, specifically when used with LiteIDE
# Code coverage profiles and other test artifacts
*.out
coverage.*
*.coverprofile
profile.cov

# Dependency directories (remove the comment below to include it)
# vendor/

# Custom additions
/bin/*
# Go workspace file
go.work
go.work.sum

# env file
.env

# Editor/IDE
# .idea/
# .vscode/
35 changes: 35 additions & 0 deletions .goreleaser.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
# yaml-language-server: $schema=https://goreleaser.com/static/schema.json
# GoReleaser v2
version: 2

project_name: barcomic

dist: dist

builds:
- env:
- CGO_ENABLED=0
mod_timestamp: "{{ .CommitTimestamp }}"
goos: [linux, darwin, windows]
goarch: [amd64, arm64]
ignore:
- goos: windows
goarch: arm64
ldflags:
- -s -w -X github.com/thegraydot/barcomic/cmd.Version={{.Version}} -X github.com/thegraydot/barcomic/cmd.Hash={{.Commit}}

archives:
- name_template: "{{ .ProjectName }}_{{ .Version }}_{{ .Os }}_{{ .Arch }}"
formats: [tar.gz]
format_overrides:
- goos: windows
formats: [zip]

checksum:
name_template: "checksums.txt"
algorithm: sha256

changelog:
sort: desc
filters:
exclude: ["^docs:", "^test:", "^chore:", "^Merge "]
7 changes: 7 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
# CHANGELOG

## 1.1.0 - 2026-04-29

### Changed

- Complete rewrite
Loading