diff --git a/.github/workflows/release.yaml b/.github/workflows/release.yaml deleted file mode 100644 index 1cadc0f93..000000000 --- a/.github/workflows/release.yaml +++ /dev/null @@ -1,33 +0,0 @@ -name: release -on: - workflow_dispatch: - -jobs: - goreleaser: - runs-on: ubuntu-latest - steps: - - name: Checkout - uses: actions/checkout@v4 - with: - fetch-depth: 0 - - - name: Set up Go - uses: actions/setup-go@v5 - with: - go-version-file: go.mod - - - name: Import GPG key - id: import_gpg - uses: paultyng/ghaction-import-gpg@v2.1.0 - env: - GPG_PRIVATE_KEY: ${{ secrets.GPG_PRIVATE_KEY }} - PASSPHRASE: ${{ secrets.GPG_PASSPHRASE }} - - - name: Run GoReleaser - uses: goreleaser/goreleaser-action@v6 - with: - version: latest - args: release --clean - env: - GPG_FINGERPRINT: ${{ steps.import_gpg.outputs.fingerprint }} - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} diff --git a/.github/workflows/tests.yaml b/.github/workflows/tests.yaml index 41f0aaa41..721b623e1 100644 --- a/.github/workflows/tests.yaml +++ b/.github/workflows/tests.yaml @@ -7,19 +7,46 @@ on: - main jobs: - unit: - name: Unit Tests + test: + name: Test runs-on: ubuntu-latest strategy: matrix: go-version: [ '1.18', '1.19', '1.20', '1.21', '1.22', '1.23' ] steps: - - uses: actions/checkout@v4 + - name: Checkout + uses: actions/checkout@v4 - name: Set up Go uses: actions/setup-go@v5 with: go-version: ${{ matrix.go-version }} - - run: go test -v -cover ./... + - name: Lint code + continue-on-error: true + uses: golangci/golangci-lint-action@v6 + with: + args: --issues-exit-code=0 --timeout=5m + + - name: Run tests + run: go test -v -cover ./... + + changie: + runs-on: ubuntu-latest + needs: test + if: github.ref == 'refs/heads/main' && github.event_name != 'pull_request' + permissions: + contents: write + pull-requests: write + actions: write + steps: + - uses: actions/checkout@v4 + with: + fetch-depth: 0 + + - name: Prepare release + uses: labd/changie-release-action@v0.5.0 + with: + github-token: ${{ secrets.GITHUB_TOKEN }} +