diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 49035e9b..f1069e9f 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -11,23 +11,27 @@ on: jobs: goreleaser: runs-on: ubuntu-latest + permissions: + contents: write steps: - name: Checkout - uses: actions/checkout@v2 + uses: actions/checkout@v4 with: fetch-depth: 0 - name: Set up Go - uses: actions/setup-go@v3 + uses: actions/setup-go@v4 with: - go-version-file: 'go.mod' + go-version: 1.20.x + cache-dependency-path: | + **/go.sum + **/go.mod - name: Run GoReleaser - uses: goreleaser/goreleaser-action@v2 + uses: goreleaser/goreleaser-action@v5 with: version: latest args: release --rm-dist -f release/goreleaser.yml env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml new file mode 100644 index 00000000..a6b83402 --- /dev/null +++ b/.github/workflows/test.yml @@ -0,0 +1,33 @@ +# Copyright 2023 The Flux Authors. +# SPDX-License-Identifier: Apache-2.0 + +name: test + +on: + workflow_dispatch: + push: + branches: + - '*' + +jobs: + goreleaser: + runs-on: ubuntu-latest + permissions: + contents: read + steps: + - + name: Checkout + uses: actions/checkout@v4 + - + name: Set up Go + uses: actions/setup-go@v4 + with: + go-version: 1.20.x + cache-dependency-path: | + **/go.sum + **/go.mod + - + name: Test + run: | + make tidy + make test