-
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.
Move GoReleaser from Drone to GitHub Actions. Add 'make all' to workflows. Move version details out to dedicated external package. Various tooling updates.
- Loading branch information
Showing
19 changed files
with
309 additions
and
130 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
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
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,11 @@ | ||
version: 2 | ||
updates: | ||
- package-ecosystem: github-actions | ||
directory: / | ||
schedule: | ||
interval: weekly | ||
|
||
- package-ecosystem: gomod | ||
directory: "/" | ||
schedule: | ||
interval: weekly |
This file was deleted.
Oops, something went wrong.
File renamed without changes.
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,56 @@ | ||
name: Go | ||
|
||
on: | ||
push: | ||
branches: | ||
- main | ||
paths: | ||
- "**.go" | ||
|
||
pull_request: | ||
branches: | ||
- main | ||
paths: | ||
- "**.go" | ||
|
||
permissions: | ||
contents: read | ||
|
||
jobs: | ||
build: | ||
name: Test and lint and build | ||
|
||
strategy: | ||
matrix: | ||
go-version: | ||
- 1.14.x | ||
- 1.15.x | ||
- 1.16.x | ||
platform: | ||
- ubuntu-latest | ||
- macos-latest | ||
|
||
runs-on: ${{ matrix.platform }} | ||
|
||
steps: | ||
- name: Set up Go ${{ matrix.go-version }} | ||
uses: actions/setup-go@v2 | ||
with: | ||
go-version: ${{ matrix.go-version }} | ||
|
||
- name: Check out code | ||
uses: actions/checkout@v2 | ||
|
||
- name: Update 'make' and run 'make all' on Linux | ||
if: ${{ matrix.platform == 'ubuntu-latest' }} | ||
run: | | ||
sudo apt-get update | ||
sudo apt-get --only-upgrade install build-essential | ||
make all | ||
# Cannot use Docker on macOS runners: https://github.community/t/why-is-docker-not-installed-on-macos/17017 | ||
- name: Install 'make' and run 'make test' on macOS | ||
if: ${{ matrix.platform == 'macos-latest' }} | ||
run: | | ||
brew install make | ||
/usr/local/opt/make/libexec/gnubin/make 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,30 @@ | ||
name: goreleaser | ||
|
||
on: | ||
push: | ||
tags: | ||
- v* | ||
|
||
permissions: | ||
contents: write | ||
|
||
jobs: | ||
goreleaser: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v2 | ||
with: | ||
fetch-depth: 0 | ||
|
||
- name: Set up Go | ||
uses: actions/setup-go@v2 | ||
with: | ||
go-version: 1.16 | ||
|
||
- name: Run GoReleaser | ||
uses: goreleaser/goreleaser-action@v2 | ||
with: | ||
args: release --rm-dist | ||
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
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
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,41 @@ | ||
builds: | ||
- flags: | ||
- -trimpath | ||
- -v | ||
|
||
ldflags: | ||
- > | ||
-X 'go.jlucktay.dev/version.buildDate={{ .Date }}' | ||
-X 'go.jlucktay.dev/version.builtBy=GoReleaser' | ||
-X 'go.jlucktay.dev/version.commit={{ .ShortCommit }}' | ||
-X 'go.jlucktay.dev/version.executable={{ .ProjectName }}' | ||
-X 'go.jlucktay.dev/version.version={{ .Version }}' | ||
env: | ||
- CGO_ENABLED=0 | ||
|
||
goos: | ||
- linux | ||
- windows | ||
- darwin | ||
|
||
# Set the modified timestamp on the output binary, typically you would do this to ensure a build was reproducible. | ||
mod_timestamp: "{{ .CommitTimestamp }}" | ||
|
||
archives: | ||
- replacements: | ||
"386": i386 | ||
amd64: x86_64 | ||
darwin: Darwin | ||
linux: Linux | ||
windows: Windows | ||
|
||
snapshot: | ||
name_template: "{{ incpatch .Version }}-next" | ||
|
||
checksum: | ||
name_template: checksums.txt | ||
algorithm: sha256 | ||
|
||
changelog: | ||
sort: asc |
This file was deleted.
Oops, something went wrong.
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 |
---|---|---|
@@ -1,5 +1,5 @@ | ||
{ | ||
"gopls": { | ||
"local": "go.jlucktay.dev/goppuku" | ||
"formatting.local": "go.jlucktay.dev/goppuku" | ||
} | ||
} |
Oops, something went wrong.