Skip to content

Commit 98cf394

Browse files
committed
More tooling updates
1 parent e180469 commit 98cf394

12 files changed

Lines changed: 230 additions & 298 deletions

File tree

.github/workflows/ci.yml

Lines changed: 11 additions & 50 deletions
Original file line numberDiff line numberDiff line change
@@ -8,77 +8,38 @@ on:
88

99
jobs:
1010
test:
11-
strategy:
12-
matrix:
13-
os: [ubuntu-latest, windows-latest, macos-latest]
14-
go-version: ['1.26']
15-
runs-on: ${{ matrix.os }}
11+
runs-on: ubuntu-latest
1612
steps:
1713
- name: Checkout
18-
uses: actions/checkout@v4
14+
uses: actions/checkout@v6
1915

2016
- name: Set up Go
21-
uses: actions/setup-go@v5
17+
uses: actions/setup-go@v6
2218
with:
23-
go-version: ${{ matrix.go-version }}
19+
go-version: '1.26'
2420
cache: true
2521

26-
- name: Download dependencies
27-
run: go mod download
28-
29-
- name: Verify dependencies
30-
run: go mod verify
22+
- name: Install Task
23+
uses: go-task/setup-task@v1
3124

32-
- name: Run go vet
33-
run: go vet ./...
34-
35-
- name: Run tests
36-
run: go test -v -race -coverprofile=coverage.out -covermode=atomic ./...
37-
38-
- name: Upload coverage to Codecov
39-
if: matrix.os == 'ubuntu-latest' && matrix.go-version == '1.26'
40-
uses: codecov/codecov-action@v4
41-
with:
42-
file: ./coverage.out
43-
flags: unittests
44-
name: codecov-umbrella
25+
- name: Run sanity checks and tests
26+
run: task ci
4527

4628
lint:
4729
runs-on: ubuntu-latest
4830
steps:
4931
- name: Checkout
50-
uses: actions/checkout@v4
32+
uses: actions/checkout@v6
5133

5234
- name: Set up Go
53-
uses: actions/setup-go@v5
35+
uses: actions/setup-go@v6
5436
with:
5537
go-version: '1.26'
5638
cache: true
5739

5840
- name: Run golangci-lint
59-
uses: golangci/golangci-lint-action@v4
41+
uses: golangci/golangci-lint-action@v9
6042
with:
6143
version: latest
6244
args: --timeout=5m
6345

64-
build:
65-
runs-on: ubuntu-latest
66-
steps:
67-
- name: Checkout
68-
uses: actions/checkout@v4
69-
70-
- name: Set up Go
71-
uses: actions/setup-go@v5
72-
with:
73-
go-version: '1.26'
74-
cache: true
75-
76-
- name: Build
77-
run: go build -v ./...
78-
79-
- name: Test build with GoReleaser
80-
uses: goreleaser/goreleaser-action@v6
81-
with:
82-
distribution: goreleaser
83-
version: latest
84-
args: build --snapshot --clean

.github/workflows/release.yml

Lines changed: 17 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ on:
66
- 'v*'
77

88
permissions:
9+
id-token: write # Required for NPM OIDC
910
contents: write
1011
packages: write
1112

@@ -14,18 +15,21 @@ jobs:
1415
runs-on: ubuntu-latest
1516
steps:
1617
- name: Checkout
17-
uses: actions/checkout@v4
18+
uses: actions/checkout@v6
1819
with:
1920
fetch-depth: 0
2021

2122
- name: Set up Go
22-
uses: actions/setup-go@v5
23+
uses: actions/setup-go@v6
2324
with:
24-
go-version: '1.19'
25+
go-version: '1.26'
2526
cache: true
2627

27-
- name: Run tests
28-
run: go test -v -race ./...
28+
- name: Install Task
29+
uses: go-task/setup-task@v1
30+
31+
- name: Run sanity checks and tests
32+
run: task ci
2933

3034
- name: Run GoReleaser
3135
uses: goreleaser/goreleaser-action@v6
@@ -35,9 +39,13 @@ jobs:
3539
args: release --clean
3640
env:
3741
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
42+
GH_PAT: ${{ secrets.GH_PAT }}
3843

39-
- name: Upload artifacts
40-
uses: actions/upload-artifact@v4
44+
- name: Set up Node.js
45+
uses: actions/setup-node@v4
4146
with:
42-
name: dist
43-
path: dist/
47+
node-version: '24'
48+
registry-url: 'https://registry.npmjs.org'
49+
50+
- name: Publish to npm
51+
run: npm publish

.goreleaser.yaml

Lines changed: 22 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ builds:
2727
- -s -w
2828
- -X main.version={{.Version}}
2929
- -X main.commit={{.Commit}}
30-
- -X main.date={{.Date}}
30+
- -X main.date={{.CommitTimestamp}}
3131
mod_timestamp: '{{ .CommitTimestamp }}'
3232

3333
# Our binaries are small, so we can skip UPX compression
@@ -145,25 +145,27 @@ winget:
145145
branch: master
146146
draft: false
147147

148-
chocolateys:
149-
- name: betterdiscordcli
150-
owners: BetterDiscord
151-
title: BetterDiscord CLI
152-
authors: BetterDiscord
153-
project_url: https://betterdiscord.app/
154-
url_template: "https://github.com/BetterDiscord/cli/releases/download/{{ .Tag }}/{{ .ArtifactName }}"
155-
icon_url: https://betterdiscord.app/resources/branding/logo_solid.png
156-
copyright: 2025 BetterDiscord Limited
157-
license_url: https://github.com/BetterDiscord/cli/blob/main/LICENSE
158-
project_source_url: https://github.com/BetterDiscord/cli
159-
docs_url: https://docs.betterdiscord.app/
160-
bug_tracker_url: https://github.com/BetterDiscord/cli/issues
161-
tags: "betterdiscord cli discord"
162-
summary: A cross-platform CLI for managing BetterDiscord
163-
description: |
164-
A cross-platform CLI for managing BetterDiscord.
165-
Provides commands to install, uninstall, and manage BetterDiscord on your system.
166-
release_notes: "https://github.com/BetterDiscord/cli/releases/tag/v{{ .Version }}"
148+
# Can't do this on linux or macOS, so we'll just skip it for now.
149+
# We can always add it back later if we want to support it.
150+
# chocolateys:
151+
# - name: betterdiscordcli
152+
# owners: BetterDiscord
153+
# title: BetterDiscord CLI
154+
# authors: BetterDiscord
155+
# project_url: https://betterdiscord.app/
156+
# url_template: "https://github.com/BetterDiscord/cli/releases/download/{{ .Tag }}/{{ .ArtifactName }}"
157+
# icon_url: https://betterdiscord.app/resources/branding/logo_solid.png
158+
# copyright: 2025 BetterDiscord Limited
159+
# license_url: https://github.com/BetterDiscord/cli/blob/main/LICENSE
160+
# project_source_url: https://github.com/BetterDiscord/cli
161+
# docs_url: https://docs.betterdiscord.app/
162+
# bug_tracker_url: https://github.com/BetterDiscord/cli/issues
163+
# tags: "betterdiscord cli discord"
164+
# summary: A cross-platform CLI for managing BetterDiscord
165+
# description: |
166+
# A cross-platform CLI for managing BetterDiscord.
167+
# Provides commands to install, uninstall, and manage BetterDiscord on your system.
168+
# release_notes: "https://github.com/BetterDiscord/cli/releases/tag/v{{ .Version }}"
167169

168170

169171

0 commit comments

Comments
 (0)