From 806d0626f813bd54755873fa2164f21635ec356d Mon Sep 17 00:00:00 2001 From: Frank Date: Fri, 12 Apr 2024 22:30:08 +0000 Subject: [PATCH] Sync --- .github/workflows/release.yml | 5 +++++ .goreleaser.yml | 26 ++++++++++++++++++++++++++ scripts/release | 3 +-- 3 files changed, 32 insertions(+), 2 deletions(-) create mode 100644 .goreleaser.yml diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index bb49f28..7994719 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -33,9 +33,11 @@ jobs: node-version: 20.x - name: Go Mod + working-directory: ./provider run: go mod download - uses: goreleaser/goreleaser-action@v4 + working-directory: ./provider with: distribution: goreleaser version: latest @@ -44,6 +46,9 @@ jobs: GITHUB_TOKEN: ${{ secrets.SST_GITHUB_TOKEN }} AUR_KEY: ${{ secrets.AUR_KEY }} + - run: make build_nodejs + - run: yarn npm publish + working-directory: ./sdk/nodejs env: NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} diff --git a/.goreleaser.yml b/.goreleaser.yml new file mode 100644 index 0000000..0eda7e5 --- /dev/null +++ b/.goreleaser.yml @@ -0,0 +1,26 @@ +archives: + - id: archive + name_template: "{{ .Binary }}-{{ .Tag }}-{{ .Os }}-{{ .Arch }}" +before: + hooks: + - make tfgen +builds: + - binary: pulumi-resource-namecheap + dir: provider + goarch: + - amd64 + - arm64 + goos: + - darwin + - windows + - linux + ignore: [] + ldflags: + - -X github.com/sst/pulumi-namecheap/provider/pkg/version.Version={{.Tag}} + main: ./cmd/pulumi-resource-namecheap/ + sort: asc + use: git +release: + disable: false +snapshot: + name_template: "{{ .Tag }}-SNAPSHOT" diff --git a/scripts/release b/scripts/release index 6f4b5d7..04a01e5 100755 --- a/scripts/release +++ b/scripts/release @@ -7,8 +7,7 @@ latest_tag=$(git tag --sort=committerdate | grep -E '[0-9]' | tail -1) # If there is no tag, exit the script if [ -z "$latest_tag" ]; then - echo "No tags found" - exit 1 + latest_tag=v0.0.0 fi echo "Latest tag: $latest_tag"