diff --git a/.github/workflows/release.yaml b/.github/workflows/release.yaml index bf28154..1cadc0f 100644 --- a/.github/workflows/release.yaml +++ b/.github/workflows/release.yaml @@ -1,12 +1,10 @@ name: release - on: workflow_dispatch: jobs: goreleaser: runs-on: ubuntu-latest - environment: release steps: - name: Checkout uses: actions/checkout@v4 @@ -16,20 +14,20 @@ jobs: - name: Set up Go uses: actions/setup-go@v5 with: - go-version: "1.22" + go-version-file: go.mod - name: Import GPG key id: import_gpg - uses: crazy-max/ghaction-import-gpg@v6 - with: - gpg_private_key: ${{ secrets.GPG_PRIVATE_KEY }} - passphrase: ${{ secrets.GPG_PASSPHRASE }} + 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 --rm-dist + 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 f7b7886..c10dc29 100644 --- a/.github/workflows/tests.yaml +++ b/.github/workflows/tests.yaml @@ -1,8 +1,9 @@ name: Run Tests -on: [ push ] +on: [push] jobs: + test: runs-on: ubuntu-latest @@ -14,12 +15,13 @@ jobs: terraform_version: 1.4.6 terraform_wrapper: false - - name: Set up Go 1.22 + - name: Set up Go uses: actions/setup-go@v5 with: - go-version: "1.22" + go-version-file: go.mod - name: golangci-lint + continue-on-error: true uses: golangci/golangci-lint-action@v6 with: args: --issues-exit-code=0 --timeout=5m @@ -32,10 +34,17 @@ jobs: STORYBLOK_TOKEN: foobar - name: Upload to codecov - uses: codecov/codecov-action@v4 + uses: codecov/codecov-action@v5 with: verbose: true + - name: build binary + uses: goreleaser/goreleaser-action@v6 + with: + args: build --snapshot --clean --single-target + env: + GOPATH: ${{ env.GOPATH }} + changie: runs-on: ubuntu-latest needs: test diff --git a/.gitignore b/.gitignore index ca98185..bb97231 100644 --- a/.gitignore +++ b/.gitignore @@ -8,3 +8,4 @@ dist/ /local /.idea /.env +/mach-composer diff --git a/Taskfile.yml b/Taskfile.yml index 130f9ac..c38ebe4 100644 --- a/Taskfile.yml +++ b/Taskfile.yml @@ -13,6 +13,11 @@ tasks: PLATFORM: sh: echo "$(go env GOOS)_$(go env GOARCH)" + build: + env: + GORELEASER_CURRENT_TAG: "v0.0.0" + cmd: goreleaser build --snapshot --clean --single-target --output mach-composer + format: cmds: - go fmt ./...