diff --git a/.github/workflows/release-dry-run.yml b/.github/workflows/release-dry-run.yml index 9e19c92..a25ad6e 100644 --- a/.github/workflows/release-dry-run.yml +++ b/.github/workflows/release-dry-run.yml @@ -18,9 +18,9 @@ jobs: fetch-depth: 0 - name: Set up Go - uses: actions/setup-go@v2 + uses: actions/setup-go@v4 with: - go-version: 1.18 + go-version: '1.20' - name: Set up Node uses: actions/setup-node@v2 @@ -34,10 +34,10 @@ jobs: working-directory: ./ui/desktop - name: Run GoReleaser - uses: goreleaser/goreleaser-action@v2 + uses: goreleaser/goreleaser-action@v4 with: version: latest - args: release --snapshot --skip-publish --rm-dist + args: release --snapshot --skip-publish --clean env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 5708e72..32208e0 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -14,9 +14,9 @@ jobs: fetch-depth: 0 - name: Set up Go - uses: actions/setup-go@v2 + uses: actions/setup-go@v4 with: - go-version: 1.18 + go-version: '1.20' - name: Set up Node uses: actions/setup-node@v2 @@ -30,9 +30,9 @@ jobs: working-directory: ./ui/desktop - name: Run GoReleaser - uses: goreleaser/goreleaser-action@v2 + uses: goreleaser/goreleaser-action@v4 with: version: latest - args: release --rm-dist + args: release --clean env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index cd0ae45..70fa60a 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -13,13 +13,13 @@ jobs: strategy: fail-fast: false matrix: - go-version: [1.17.x, 1.18.x] + go-version: [1.18.x, 1.19.x, 1.20.x] os: [ubuntu-latest, macos-latest, windows-latest] tags: [cli, desktop] runs-on: ${{ matrix.os }} steps: - name: Install Go - uses: actions/setup-go@v2 + uses: actions/setup-go@v4 with: go-version: ${{ matrix.go-version }} diff --git a/.goreleaser.yml b/.goreleaser.yml index 268e41c..1411b3c 100644 --- a/.goreleaser.yml +++ b/.goreleaser.yml @@ -70,28 +70,34 @@ archives: builds: - loophole-cli - loophole-cli-win - replacements: - amd64: 64bit - 386: 32bit - darwin: macos format_overrides: - goos: windows format: zip wrap_in_directory: true - name_template: "{{ .ProjectName }}-cli_{{ .Version }}_{{ .Os }}_{{ .Arch }}{{ if .Arm }}v{{ .Arm }}{{ end }}{{ if .Mips }}_{{ .Mips }}{{ end }}" + name_template: >- + {{ .ProjectName }}-cli_{{ .Version }}_ + {{- if eq .Os "darwin" }}macos{{ else }}{{ title .Os }}{{ end }}_ + {{- if eq .Arch "amd64" }}x86_64 + {{- else if eq .Arch "386" }}i386 + {{- else }}{{ .Arch }}{{ end }} + {{- if .Arm }}v{{ .Arm }}{{ end }} + {{- if .Mips }}_{{ .Mips }}{{ end }} - id: desktop builds: - loophole-desktop - loophole-desktop-win - replacements: - amd64: 64bit - 386: 32bit - darwin: macos + name_template: >- + {{ .ProjectName }}-desktop_{{ .Version }}_ + {{- if eq .Os "darwin" }}macos{{ else }}{{ title .Os }}{{ end }}_ + {{- if eq .Arch "amd64" }}x86_64 + {{- else if eq .Arch "386" }}i386 + {{- else }}{{ .Arch }}{{ end }} + {{- if .Arm }}v{{ .Arm }}{{ end }} + {{- if .Mips }}_{{ .Mips }}{{ end }} format_overrides: - goos: windows format: zip wrap_in_directory: true - name_template: "{{ .ProjectName }}-desktop_{{ .Version }}_{{ .Os }}_{{ .Arch }}{{ if .Arm }}v{{ .Arm }}{{ end }}{{ if .Mips }}_{{ .Mips }}{{ end }}" checksum: name_template: "checksums.txt" diff --git a/go.mod b/go.mod index 204503a..b93ac14 100644 --- a/go.mod +++ b/go.mod @@ -1,6 +1,6 @@ module github.com/loophole/cli -go 1.18 +go 1.20 require ( github.com/abbot/go-http-auth v0.4.0