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
16 changes: 16 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
version: 2

updates:
- package-ecosystem: "github-actions"
directory: "/"
schedule:
interval: "weekly"
day: "monday"
open-pull-requests-limit: 5
commit-message:
prefix: "chore(actions)"
groups:
actions-minor-patch:
update-types:
- "minor"
- "patch"
30 changes: 25 additions & 5 deletions .github/workflows/audit.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,28 +6,48 @@ on:
pull_request:
branches: [ master ]

permissions:
contents: read

concurrency:
group: ci-${{ github.workflow }}-${{ github.ref }}${{ github.ref == 'refs/heads/master' && format('-{0}', github.sha) || '' }}
cancel-in-progress: ${{ github.ref != 'refs/heads/master' }}

jobs:
audit:
runs-on: ubuntu-latest
steps:
-
name: Checkout
uses: actions/checkout@v4
uses: actions/checkout@v7

-
name: Set up Go
uses: actions/setup-go@v5
uses: actions/setup-go@v7
with:
go-version: '1.25.0'
go-version: '1.26'
cache-dependency-path: |
go.sum
lib/go.sum

-
name: Verify dependencies
run: go mod verify
run: |
go mod verify
go -C lib mod verify

-
name: Build
run: go build -v ./...

-
name: Run go vet
run: go vet ./...
run: |
go vet ./...
go -C lib vet ./...

-
name: Run tests
run: |
go test ./...
go -C lib test ./...
24 changes: 17 additions & 7 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,27 +4,36 @@ on:
release:
types: [published]
workflow_dispatch:
inputs:
tag:
description: Existing tag to build and publish
required: true

permissions:
contents: write

jobs:
goreleaser:
runs-on: macos-latest
runs-on: macos-26
steps:
-
name: Checkout
uses: actions/checkout@v4
uses: actions/checkout@v7
with:
ref: ${{ inputs.tag }}
fetch-depth: 0
-
name: Fetch all tags
run: git fetch --force --tags
-
name: Set up Go
uses: actions/setup-go@v2
uses: actions/setup-go@v7
with:
go-version: '1.25.0'
go-version: '1.26'
cache: false
-
name: Generate Homebrew tap token
uses: actions/create-github-app-token@v2
uses: actions/create-github-app-token@v3
id: tap-token
with:
app-id: ${{ secrets.TAP_APP_ID }}
Expand All @@ -33,7 +42,7 @@ jobs:
repositories: homebrew-note-cli
-
name: Run GoReleaser
uses: goreleaser/goreleaser-action@v6
uses: goreleaser/goreleaser-action@v7
with:
distribution: goreleaser
version: '~> v2'
Expand All @@ -43,7 +52,8 @@ jobs:
TAP_GITHUB_TOKEN: ${{ steps.tap-token.outputs.token }}
-
name: Upload assets
uses: actions/upload-artifact@v4
uses: actions/upload-artifact@v7
with:
name: note-cli
path: dist/*
retention-days: 7
13 changes: 13 additions & 0 deletions .goreleaser.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
version: 2

env:
- MACOSX_DEPLOYMENT_TARGET=15.0

before:
hooks:
- go mod tidy
Expand Down Expand Up @@ -52,6 +55,15 @@ builds:
goarm: 6
- goos: windows
goarch: arm64
hooks: &macos-minos-check
post:
- cmd: >-
sh -c 'case "$0" in darwin_*)
minos=$(otool -l "$1" | awk "/LC_BUILD_VERSION/{f=1} f && /minos/{print \$2; exit}");
echo "$1: minos $minos";
test "$minos" = "$MACOSX_DEPLOYMENT_TARGET";;
esac' "{{ .Target }}" "{{ .Path }}"
output: true

-
id: "notehub"
Expand All @@ -72,6 +84,7 @@ builds:
goarm: 6
- goos: windows
goarch: arm64
hooks: *macos-minos-check

checksum:
name_template: 'checksums.txt'
Expand Down
Loading