Skip to content

Commit

Permalink
Finished moving to goreleaser
Browse files Browse the repository at this point in the history
Signed-off-by: James Humphries <[email protected]>
  • Loading branch information
Yantrio committed Feb 29, 2024
1 parent ce059f4 commit 6164b29
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 19 deletions.
26 changes: 8 additions & 18 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@ on:
- 'v*'
workflow_dispatch: # This is needed to trigger the workflow manually


jobs:
release:
name: 🚀 Release new pulumi provider version
Expand Down Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion .goreleaser.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 6164b29

Please sign in to comment.