-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
0 parents
commit c8e92df
Showing
12 changed files
with
227 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
name: golangci-lint | ||
on: | ||
push: | ||
branches: | ||
- main | ||
pull_request: | ||
|
||
permissions: | ||
contents: read | ||
|
||
jobs: | ||
golangci: | ||
name: lint | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- uses: actions/setup-go@v4 | ||
with: | ||
go-version: "1.21.1" | ||
cache: false # golangci-lint does it's own caching of this. | ||
- name: golangci-lint | ||
uses: golangci/golangci-lint-action@v3 | ||
with: | ||
version: v1.54.2 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
name: goreleaser | ||
|
||
on: | ||
push: | ||
# Run only on tags | ||
tags: | ||
- "*" | ||
|
||
permissions: | ||
contents: write | ||
packages: write | ||
|
||
jobs: | ||
goreleaser: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v4 | ||
with: | ||
fetch-depth: 0 | ||
- run: git fetch --force --tags | ||
- name: Install Tool Versions | ||
uses: jdxcode/rtx-action@v1 | ||
env: | ||
GH_TOKEN: ${{ github.token }} | ||
- name: Login to GitHub Container Registry | ||
uses: docker/login-action@v3 | ||
with: | ||
registry: ghcr.io | ||
username: ${{ github.actor }} | ||
password: ${{ secrets.GITHUB_TOKEN }} | ||
- uses: goreleaser/goreleaser-action@v5 | ||
with: | ||
distribution: goreleaser | ||
version: latest | ||
args: release --clean | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
vendor/ | ||
bin/ | ||
testdata/ | ||
output/ | ||
.DS_Store | ||
*.out | ||
.task |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,70 @@ | ||
# yaml-language-server: $schema=https://goreleaser.com/static/schema.json | ||
# vim: set ts=2 sw=2 tw=0 fo=cnqoj | ||
project_name: minecraft-preempt | ||
before: | ||
hooks: | ||
- go mod download | ||
builds: | ||
- main: ./cmd/minecraft-preempt | ||
env: | ||
- CGO_ENABLED=0 | ||
goarch: | ||
- amd64 | ||
- arm64 | ||
goos: | ||
- linux | ||
- windows | ||
- darwin | ||
|
||
archives: | ||
- format: tar.gz | ||
# use zip for windows archives | ||
format_overrides: | ||
- goos: windows | ||
format: zip | ||
dockers: | ||
# amd64 | ||
- use: buildx | ||
build_flag_templates: | ||
- --platform=linux/amd64 | ||
- --label=org.opencontainers.image.title={{ .ProjectName }} | ||
- --label=org.opencontainers.image.description={{ .ProjectName }} | ||
- --label=org.opencontainers.image.url=https://github.com/jaredallard/{{ .ProjectName }} | ||
- --label=org.opencontainers.image.source=https://github.com/jaredallard/{{ .ProjectName }} | ||
- --label=org.opencontainers.image.version={{ .Version }} | ||
- --label=org.opencontainers.image.created={{ time "2006-01-02T15:04:05Z07:00" }} | ||
- --label=org.opencontainers.image.revision={{ .FullCommit }} | ||
- --label=org.opencontainers.image.licenses=GPL-3.0 | ||
image_templates: | ||
- "ghcr.io/jaredallard/{{.ProjectName}}:{{ .Version }}-amd64" | ||
# arm64 | ||
- use: buildx | ||
goos: linux | ||
goarch: arm64 | ||
build_flag_templates: | ||
- --platform=linux/arm64 | ||
- --label=org.opencontainers.image.title={{ .ProjectName }} | ||
- --label=org.opencontainers.image.description={{ .ProjectName }} | ||
- --label=org.opencontainers.image.url=https://github.com/jaredallard/{{ .ProjectName }} | ||
- --label=org.opencontainers.image.source=https://github.com/jaredallard/{{ .ProjectName }} | ||
- --label=org.opencontainers.image.version={{ .Version }} | ||
- --label=org.opencontainers.image.created={{ time "2006-01-02T15:04:05Z07:00" }} | ||
- --label=org.opencontainers.image.revision={{ .FullCommit }} | ||
- --label=org.opencontainers.image.licenses=GPL-3.0 | ||
image_templates: | ||
- "ghcr.io/jaredallard/{{.ProjectName}}:{{ .Version }}-arm64" | ||
docker_manifests: | ||
- name_template: "ghcr.io/jaredallard/{{.ProjectName}}:{{ .Version }}" | ||
image_templates: | ||
- "ghcr.io/jaredallard/{{.ProjectName}}:{{ .Version }}-arm64" | ||
- "ghcr.io/jaredallard/{{.ProjectName}}:{{ .Version }}-amd64" | ||
checksum: | ||
name_template: "checksums.txt" | ||
snapshot: | ||
name_template: "{{ incpatch .Version }}-next" | ||
changelog: | ||
sort: asc | ||
filters: | ||
exclude: | ||
- "^docs:" | ||
- "^test:" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
golang 1.21.1 | ||
goreleaser 1.18.2 | ||
golangci-lint 1.54.2 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
{ | ||
"Copyright": { | ||
"description": "Inserts a GNU GPLv3 license header", | ||
"prefix": ["license", "copy", "copyright"], | ||
"body": [ | ||
"// Copyright (C) ${CURRENT_YEAR} Jared Allard <jaredallard@users.noreply.github.com>", | ||
"//", | ||
"// This program is free software: you can redistribute it and/or modify", | ||
"// it under the terms of the GNU General Public License as published by", | ||
"// the Free Software Foundation, either version 3 of the License, or", | ||
"// (at your option) any later version.", | ||
"//", | ||
"// This program is distributed in the hope that it will be useful,", | ||
"// but WITHOUT ANY WARRANTY; without even the implied warranty of", | ||
"// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the", | ||
"// GNU General Public License for more details.", | ||
"//", | ||
"// You should have received a copy of the GNU General Public License", | ||
"// along with this program. If not, see <https://www.gnu.org/licenses/>.", | ||
"" | ||
] | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
SHELL := /bin/bash | ||
|
||
.PHONY: build | ||
build: | ||
@command -v task >/dev/null || (echo "task not found, please install it. https://taskfile.dev/installation/" && exit 1) | ||
@task |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
# miku | ||
|
||
A Discord bot to convert media links (e.g., Spotify, Apple Music) | ||
between each other. | ||
|
||
## Usage | ||
|
||
TODO | ||
|
||
## License | ||
|
||
GPL-2.0-only |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
version: "3" | ||
|
||
tasks: | ||
default: | ||
cmds: | ||
- task: build | ||
test: | ||
cmds: | ||
- go test -v ./... | ||
build: | ||
generates: | ||
- bin/miku | ||
sources: | ||
- "./**/*.go" | ||
cmds: | ||
- go build -trimpath -ldflags="-w -s" -o ./bin/ -v ./cmd/miku |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
// Copyright (C) 2023 Jared Allard <jaredallard@users.noreply.github.com> | ||
// | ||
// This program is free software: you can redistribute it and/or modify | ||
// it under the terms of the GNU General Public License as published by | ||
// the Free Software Foundation, either version 3 of the License, or | ||
// (at your option) any later version. | ||
// | ||
// This program is distributed in the hope that it will be useful, | ||
// but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
// GNU General Public License for more details. | ||
// | ||
// You should have received a copy of the GNU General Public License | ||
// along with this program. If not, see <https://www.gnu.org/licenses/>. | ||
|
||
// Package main implements the CLI wrapper for the miku discord bot. | ||
package main | ||
|
||
// main implements the miku CLI. | ||
func main() { | ||
return | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
module github.com/jaredallard/miku | ||
|
||
go 1.21.1 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
{ | ||
"$schema": "https://docs.renovatebot.com/renovate-schema.json", | ||
"extends": ["config:base"] | ||
} |