diff --git a/.github/workflows/master.yml b/.github/workflows/master.yml index 01fd2df..6164f05 100644 --- a/.github/workflows/master.yml +++ b/.github/workflows/master.yml @@ -111,4 +111,36 @@ jobs: name: pulumi-${{ env.PROVIDER }} path: ${{ github.workspace }}/bin - name: Test Provider Library - run: make test_provider \ No newline at end of file + run: make test_provider + publish: + name: publish + needs: build_sdk + runs-on: ubuntu-latest + strategy: + matrix: + goversion: [1.16.x] + steps: + - name: Checkout Repo + uses: actions/checkout@v2 + - name: Unshallow clone for tags + run: git fetch --prune --unshallow --tags + - name: Setup Go + uses: actions/setup-go@v2 + with: + go-version: ${{ matrix.goversion }} + - name: Install pulumictl + uses: jaxxstorm/action-install-gh-release@v1.1.0 + with: + repo: pulumi/pulumictl + - name: Install Pulumi CLI + uses: pulumi/action-install-pulumi-cli@v1.0.1 + with: + pulumi-version: 3.0.0-rc.1 + - name: Set Release Version + run: echo "GORELEASER_CURRENT_TAG=v$(pulumictl get version --language + generic)" >> $GITHUB_ENV + - name: Run GoReleaser + uses: goreleaser/goreleaser-action@v2 + with: + args: -p 1 -f .goreleaser.yml --rm-dist --skip-validate --timeout 60m0s + version: latest \ No newline at end of file diff --git a/.goreleaser.yml b/.goreleaser.yml new file mode 100644 index 0000000..25343ef --- /dev/null +++ b/.goreleaser.yml @@ -0,0 +1,28 @@ +archives: + - id: archive + name_template: '{{ .Binary }}-{{ .Tag }}-{{ .Os }}-{{ .Arch }}' +before: + hooks: + - make gen +builds: + - binary: pulumi-slack + dir: provider + env: + - CGO_ENABLED=0 + - GO111MODULE=on + goarch: + - amd64 + - arm64 + goos: + - darwin + - windows + - linux + ldflags: + - -X github.com/totvs/pulumi-slack/provider/pkg/version.Version={{.Tag}} + main: ./cmd/pulumi-slack/ +changelog: + skip: true +release: + disable: false +snapshot: + name_template: '{{ .Tag }}-SNAPSHOT' \ No newline at end of file