From 6164b29b6112707f66fac83763fc30f023825524 Mon Sep 17 00:00:00 2001 From: James Humphries Date: Thu, 29 Feb 2024 10:35:22 +0000 Subject: [PATCH] Finished moving to goreleaser Signed-off-by: James Humphries --- .github/workflows/release.yml | 26 ++++++++------------------ .goreleaser.yml | 2 +- 2 files changed, 9 insertions(+), 19 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 47d1511..d84a0ae 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -6,7 +6,6 @@ on: - 'v*' workflow_dispatch: # This is needed to trigger the workflow manually - jobs: release: name: 🚀 Release new pulumi provider version @@ -42,26 +41,17 @@ jobs: - name: Print pulumictl version run: pulumictl get version - - name: Build provider - run: make provider - env: - PROVIDER_OS: ${{ matrix.provider_os }} - - - name: Create package directory - run: | - mkdir -p package/arm64 package/amd64 - mv bin/pulumi-resource-*amd64* package/amd64/pulumi-resource-spacelift - mv bin/pulumi-resource-*arm64* package/arm64/pulumi-resource-spacelift + - name: Set PreRelease Version + run: echo "GORELEASER_CURRENT_TAG=v$(pulumictl get version --language generic)" >> $GITHUB_ENV - - name: Create package - run: | - cd package/amd64 - tar -zcvf pulumi-resource-spacelift-${{ github.ref_name }}-${{matrix.provider_os}}-amd64.tar.gz pulumi-resource-* - cd ../arm64 - tar -zcvf pulumi-resource-spacelift-${{ github.ref_name }}-${{matrix.provider_os}}-arm64.tar.gz pulumi-resource-* + - name: Run GoReleaser + uses: goreleaser/goreleaser-action@v5 + with: + args: -p 3 release --rm-dist + version: latest - name: Create upload directory - run: mkdir -p upload/pulumi-plugins && mv package/*/*.tar.gz upload/pulumi-plugins/ && ls -la upload/pulumi-plugins/ + run: mkdir -p upload/pulumi-plugins && mv dist/*/*.tar.gz upload/pulumi-plugins/ && ls -la upload/pulumi-plugins/ - name: Configure AWS credentials uses: aws-actions/configure-aws-credentials@v4 diff --git a/.goreleaser.yml b/.goreleaser.yml index f78cd1b..17114c6 100644 --- a/.goreleaser.yml +++ b/.goreleaser.yml @@ -16,7 +16,7 @@ builds: - linux ignore: [] ldflags: - - -X github.com/pulumi/pulumi-spacelift/provider/pkg/version.Version={{.Tag}} + - -X github.com/spacelift-io/pulumi-spacelift/provider/pkg/version.Version={{.Tag}} main: ./cmd/pulumi-resource-spacelift/ release: disable: false