-
Notifications
You must be signed in to change notification settings - Fork 1
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
Showing
6 changed files
with
44 additions
and
22 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 |
---|---|---|
|
@@ -9,17 +9,25 @@ jobs: | |
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- name: Get Go version from .tool-versions | ||
run: echo "GO_VERSION=$(cat .tool-versions | grep -oP 'golang \K((\w+.)+\w+)')" >> $GITHUB_ENV | ||
- name: Get golangci-lint version from .tool-versions | ||
run: echo "GOLANGCI_LINT_VERSION=$(cat .tool-versions | grep -oP 'golangci-lint \K((\w+.)+\w+)')" >> $GITHUB_ENV | ||
- name: Get Go version from .mise.toml | ||
uses: SebRollen/[email protected] | ||
id: get-golang-version | ||
with: | ||
file: .mise.toml | ||
field: tools.golang | ||
- uses: actions/setup-go@v5 | ||
with: | ||
go-version: '${{ env.GO_VERSION }}' | ||
go-version: '${{ steps.get-golang-version.outputs.value }}' | ||
- name: Get golangci-lint version from .mise.toml | ||
uses: SebRollen/[email protected] | ||
id: get-golangci-lint-version | ||
with: | ||
file: .mise.toml | ||
field: tools.golangci-lint | ||
- name: golangci-lint | ||
uses: golangci/golangci-lint-action@v3 | ||
with: | ||
version: 'v${{ env.GOLANGCI_LINT_VERSION }}' | ||
version: 'v'${{ steps.get-golangci-lint-version.outputs.value }}' | ||
pre-commit: | ||
runs-on: ubuntu-latest | ||
steps: | ||
|
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 |
---|---|---|
|
@@ -16,31 +16,43 @@ jobs: | |
with: | ||
fetch-depth: 0 | ||
- run: git fetch --force --tags | ||
- name: Get Go version from .tool-versions | ||
run: echo "GO_VERSION=$(cat .tool-versions | grep -oP 'golang \K((\w+.)+\w+)')" >> $GITHUB_ENV | ||
- name: Get Golang version from .mise.toml | ||
uses: SebRollen/[email protected] | ||
id: get-golang-version | ||
with: | ||
file: .mise.toml | ||
field: tools.golang | ||
- uses: actions/setup-go@v5 | ||
with: | ||
go-version: '${{ env.GO_VERSION }}' | ||
- name: Get nfpm version from .tool-versions | ||
run: echo "NFPM_VERSION=$(cat .tool-versions | grep -oP 'nfpm \K((\w+.)+\w+)')" >> $GITHUB_ENV | ||
go-version: '${{ steps.get-golang-version.outputs.value }}' | ||
- name: Get nfpm version from .mise.toml | ||
uses: SebRollen/[email protected] | ||
id: get-golang-version | ||
with: | ||
file: .mise.toml | ||
field: tools.nfpm | ||
- name: Setup nfpm | ||
uses: supplypike/setup-bin@v3 | ||
with: | ||
uri: 'https://github.com/goreleaser/nfpm/releases/download/v${{ env.NFPM_VERSION }}/nfpm_${{ env.NFPM_VERSION }}_Linux_x86_64.tar.gz' | ||
name: 'nfpm' | ||
version: '${{ env.NFPM_VERSION }}' | ||
version: '${{ steps.get-nfpm-version.outputs.value }}' | ||
- name: Setup fury | ||
uses: supplypike/setup-bin@v3 | ||
with: | ||
uri: 'https://github.com/gemfury/cli/releases/download/v0.20.1/fury_0.20.1_Linux_64bit.tar.gz' | ||
name: 'fury' | ||
version: '0.20.1' | ||
- name: Get goreleaser version from .tool-versions | ||
run: echo "GORELEASER_VERSION=$(cat .tool-versions | grep -oP 'goreleaser \K((\w+.)+\w+)')" >> $GITHUB_ENV | ||
- name: Get goreleaser version from .mise.toml | ||
uses: SebRollen/[email protected] | ||
id: get-goreleaser-version | ||
with: | ||
file: .mise.toml | ||
field: tools.goreleaser | ||
- uses: goreleaser/goreleaser-action@v5 | ||
with: | ||
distribution: goreleaser | ||
version: '${{ env.GORELEASER_VERSION }}' | ||
version: '${{ steps.get-goreleaser-version.outputs.value }}' | ||
args: release --clean | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GH_PAT }} | ||
|
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 @@ | ||
[tools] | ||
golang = "1.20.4" | ||
golangci-lint = "1.52.2" | ||
goreleaser = "1.18.2" | ||
nfpm = "2.28.0" | ||
task = "3.24.0" |
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,8 +1,9 @@ | ||
repos: | ||
- repo: https://github.com/pre-commit/pre-commit-hooks | ||
rev: v4.4.0 | ||
rev: v4.5.0 | ||
hooks: | ||
- id: trailing-whitespace | ||
- id: end-of-file-fixer | ||
- id: check-yaml | ||
- id: check-added-large-files | ||
- id: check-toml |
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