Skip to content

Commit

Permalink
ci: upgrade workflows
Browse files Browse the repository at this point in the history
  • Loading branch information
MrMarble committed Feb 14, 2024
1 parent fda9b08 commit e905494
Show file tree
Hide file tree
Showing 2 changed files with 25 additions and 14 deletions.
15 changes: 11 additions & 4 deletions .github/workflows/golangci-lint.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
name: golangci-lint

on:
push:
tags:
Expand All @@ -7,27 +8,33 @@ on:
- master
- main
pull_request:

permissions:
contents: read

jobs:
golangci:
name: lint
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v4
with:
fetch-depth: 0
- name: golangci-lint
uses: golangci/golangci-lint-action@v2

test:
runs-on: ubuntu-latest
steps:
- name: Checkout source
uses: actions/checkout@v2
uses: actions/checkout@v4
with:
fetch-depth: 0

- name: Setup go
uses: actions/setup-go@v2
uses: actions/setup-go@v4
with:
go-version: 1.17
go-version: '>=1.17'

- name: Run tests
run: go test -v ./...
24 changes: 14 additions & 10 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -1,26 +1,30 @@
name: "Release a tag"

on:
push:
tags:
- v*
- "*"

permissions:
contents: write

jobs:
release:
runs-on: ubuntu-latest
env:
GITHUB_TOKEN: ${{ secrets.PAT }}
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v4
with:
fetch-depth: 0

- name: Install Go
uses: actions/setup-go@v2
uses: actions/setup-go@v4
with:
go-version: 1.17
- name: Unshallow
run: git fetch --prune --unshallow
go-version: '>=1.17'

- name: Create release
uses: goreleaser/goreleaser-action@v2
uses: goreleaser/goreleaser-action@v5
with:
version: latest
args: release --rm-dist
args: release --clean
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

0 comments on commit e905494

Please sign in to comment.