From 420f4598b9322031aabc6b6f32bb427402559c2c Mon Sep 17 00:00:00 2001 From: reugn Date: Fri, 17 May 2024 16:52:45 +0300 Subject: [PATCH] ci: update versions in GH workflows --- .github/workflows/release.yml | 13 ++++++++----- .github/workflows/test-coverage.yml | 14 ++++++++++---- .github/workflows/test.yml | 14 ++++++++++---- 3 files changed, 28 insertions(+), 13 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 12fdf3c..7c2a4e7 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -5,25 +5,28 @@ on: tags: - 'v*' +permissions: + contents: write + jobs: goreleaser: runs-on: ubuntu-latest steps: - name: Checkout - uses: actions/checkout@v3 + uses: actions/checkout@v4 with: fetch-depth: 0 - name: Set up Go - uses: actions/setup-go@v3 + uses: actions/setup-go@v5 with: - go-version: 1.19.x + go-version: 1.22.x - name: Run GoReleaser - uses: goreleaser/goreleaser-action@v3 + uses: goreleaser/goreleaser-action@v5 with: version: latest workdir: ./cmd/wifiqr - args: release --rm-dist + args: release --clean env: GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}} \ No newline at end of file diff --git a/.github/workflows/test-coverage.yml b/.github/workflows/test-coverage.yml index fa207a3..00b8e26 100644 --- a/.github/workflows/test-coverage.yml +++ b/.github/workflows/test-coverage.yml @@ -1,21 +1,27 @@ name: Test Coverage -on: [push, pull_request] +on: + push: + branches: + - '**' + pull_request: + branches: + - main jobs: test: runs-on: ubuntu-latest strategy: matrix: - go-version: [1.19] + go-version: [1.22] steps: - name: Setup Go - uses: actions/setup-go@v3 + uses: actions/setup-go@v5 with: go-version: ${{ matrix.go-version }} - name: Checkout code - uses: actions/checkout@v3 + uses: actions/checkout@v4 - name: Run coverage run: go test . -coverprofile=coverage.out -covermode=atomic diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 32d9616..6331e9e 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -1,21 +1,27 @@ name: Test -on: [push, pull_request] +on: + push: + branches: + - '**' + pull_request: + branches: + - main jobs: test: runs-on: ubuntu-latest strategy: matrix: - go-version: [1.18, 1.19] + go-version: [1.18, 1.22] steps: - name: Setup Go - uses: actions/setup-go@v3 + uses: actions/setup-go@v5 with: go-version: ${{ matrix.go-version }} - name: Checkout code - uses: actions/checkout@v3 + uses: actions/checkout@v4 - name: Test run: go test ./... \ No newline at end of file