From 1cd0f2bd653d6f14eb92018aaff63e57b133c3ea Mon Sep 17 00:00:00 2001 From: Bo-Yi Wu Date: Sat, 23 Sep 2023 22:22:20 +0800 Subject: [PATCH] chore: update GitHub Actions configuration for Go workflows - Change the cron expression from `'30 1 * * 0'` to `"30 1 * * 0"` in the file `.github/workflows/codeql.yaml` - Change the language option from `[ 'go']` to `["go"]` in the file `.github/workflows/codeql.yaml` - Update the `actions/checkout` version from `v3` to `v4` in the file `.github/workflows/codeql.yaml` - Change the go version from `'^1'` to `"^1"` in the file `.github/workflows/go.yml` - Update the `actions/checkout` version from `v3` to `v4` in the file `.github/workflows/go.yml` - Change the go version options from `[1.17, 1.18, 1.19, '1.20']` to `[1.18, 1.19, "1.20", 1.21]` in the file `.github/workflows/go.yml` - Change the tags expression from `'*'` to `"*"` in the file `.github/workflows/goreleaser.yml` - Update the `actions/checkout` version from `v3` to `v4` in the file `.github/workflows/goreleaser.yml` - Change the go version from `1.17` to `1.18` in the file `.github/workflows/goreleaser.yml` - Signed-off-by: Bo-Yi Wu --- .github/workflows/codeql.yaml | 10 +++++----- .github/workflows/go.yml | 6 +++--- .github/workflows/goreleaser.yml | 17 +++++++---------- 3 files changed, 15 insertions(+), 18 deletions(-) diff --git a/.github/workflows/codeql.yaml b/.github/workflows/codeql.yaml index 00c7345..81a3538 100644 --- a/.github/workflows/codeql.yaml +++ b/.github/workflows/codeql.yaml @@ -7,12 +7,12 @@ name: "CodeQL" on: push: - branches: [ master ] + branches: [master] pull_request: # The branches below must be a subset of the branches above - branches: [ master ] + branches: [master] schedule: - - cron: '30 1 * * 0' + - cron: "30 1 * * 0" jobs: analyze: @@ -33,11 +33,11 @@ jobs: # Override automatic language detection by changing the below list # Supported options are ['csharp', 'cpp', 'go', 'java', 'javascript', 'python'] # TODO: Enable for javascript later - language: [ 'go'] + language: ["go"] steps: - name: Checkout repository - uses: actions/checkout@v3 + uses: actions/checkout@v4 # Initializes the CodeQL tools for scanning. - name: Initialize CodeQL diff --git a/.github/workflows/go.yml b/.github/workflows/go.yml index aa326c9..1914f73 100644 --- a/.github/workflows/go.yml +++ b/.github/workflows/go.yml @@ -24,9 +24,9 @@ jobs: - name: Setup go uses: actions/setup-go@v4 with: - go-version: '^1' + go-version: "^1" - name: Checkout repository - uses: actions/checkout@v3 + uses: actions/checkout@v4 - name: Setup golangci-lint uses: golangci/golangci-lint-action@v3 with: @@ -36,7 +36,7 @@ jobs: strategy: matrix: os: [ubuntu-latest, macos-latest] - go: [1.17, 1.18, 1.19, '1.20'] + go: [1.18, 1.19, "1.20", 1.21] include: - os: ubuntu-latest go-build: ~/.cache/go-build diff --git a/.github/workflows/goreleaser.yml b/.github/workflows/goreleaser.yml index 81b22e9..436cbea 100644 --- a/.github/workflows/goreleaser.yml +++ b/.github/workflows/goreleaser.yml @@ -3,7 +3,7 @@ name: Goreleaser on: push: tags: - - '*' + - "*" permissions: actions: read @@ -18,19 +18,16 @@ jobs: goreleaser: runs-on: ubuntu-latest steps: - - - name: Checkout - uses: actions/checkout@v3 + - name: Checkout + uses: actions/checkout@v4 with: fetch-depth: 0 - - - name: Set up Go + - name: Set up Go uses: actions/setup-go@v4 with: - go-version: 1.17 - - - name: Run GoReleaser - uses: goreleaser/goreleaser-action@v4 + go-version: 1.18 + - name: Run GoReleaser + uses: goreleaser/goreleaser-action@v5 with: # either 'goreleaser' (default) or 'goreleaser-pro' distribution: goreleaser