From b929a7680c6c575be5a6ecfa7dce5f03d95543e9 Mon Sep 17 00:00:00 2001 From: Rohit Gupta <7895001+guptarohit@users.noreply.github.com> Date: Mon, 25 Mar 2024 02:20:26 +0530 Subject: [PATCH] Bump GitHub actions workflow dependencies (#49) * Bump GitHub actions workflow dependencies * Update release tag pattern --- .github/workflows/release.yml | 19 +++++++++---------- .github/workflows/test.yml | 8 ++++---- .goreleaser.yml | 15 ++++++++------- go.sum | 0 4 files changed, 21 insertions(+), 21 deletions(-) create mode 100644 go.sum diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 4d9216e..11d92d3 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -2,31 +2,30 @@ name: Release on: push: - tags: - - "*" + tags: ["v*.*.*"] jobs: goreleaser: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 with: fetch-depth: 0 - - uses: actions/setup-go@v4 + - uses: actions/setup-go@v5 with: - go-version: ~1.17 - - uses: docker/setup-qemu-action@v1 - - uses: docker/setup-buildx-action@v1 - - uses: docker/login-action@v1 + go-version: "stable" + - uses: docker/setup-qemu-action@v3 + - uses: docker/setup-buildx-action@v3 + - uses: docker/login-action@v3 with: registry: ghcr.io username: ${{ github.repository_owner }} password: ${{ secrets.GITHUB_TOKEN }} - name: Run GoReleaser - uses: goreleaser/goreleaser-action@v2 + uses: goreleaser/goreleaser-action@v5 with: distribution: goreleaser version: latest - args: release --rm-dist + args: release --clean env: GITHUB_TOKEN: ${{ secrets.GH_PAT }} diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index bb61e7f..50fb10d 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -12,9 +12,9 @@ jobs: name: lint runs-on: ubuntu-latest steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 - name: golangci-lint - uses: golangci/golangci-lint-action@v2 + uses: golangci/golangci-lint-action@v4 test: strategy: @@ -25,11 +25,11 @@ jobs: steps: - name: Install Go if: success() - uses: actions/setup-go@v4 + uses: actions/setup-go@v5 with: go-version: ${{ matrix.go-version }} - name: Checkout code - uses: actions/checkout@v3 + uses: actions/checkout@v4 with: path: src/github.com/guptarohit/asciigraph - name: Set up GOPATH diff --git a/.goreleaser.yml b/.goreleaser.yml index dc61ea8..23e7bc9 100644 --- a/.goreleaser.yml +++ b/.goreleaser.yml @@ -30,13 +30,14 @@ archives: files: - LICENSE - README.md - # Replacements for GOOS and GOARCH on the archive name. - replacements: - '386': i386 - darwin: Darwin - linux: Linux - windows: Windows - amd64: x86_64 + name_template: >- + {{- .ProjectName }}_ + {{- .Version }}_ + {{- title .Os }}_ + {{- if eq .Arch "amd64" }}x86_64 + {{- else if eq .Arch "386" }}i386 + {{- else }}{{ .Arch }}{{ end }} + {{- if .Arm }}v{{ .Arm }}{{ end -}} format_overrides: - goos: windows format: zip diff --git a/go.sum b/go.sum new file mode 100644 index 0000000..e69de29