Skip to content
This repository has been archived by the owner on Aug 28, 2020. It is now read-only.

Commit

Permalink
fix: semantic-release 4
Browse files Browse the repository at this point in the history
  • Loading branch information
timmyers committed Apr 17, 2020
1 parent 54d38f3 commit 6a84dc2
Show file tree
Hide file tree
Showing 5 changed files with 16 additions and 8 deletions.
5 changes: 5 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,11 @@ jobs:
uses: pulumi/action-install-tf2pulumi@releases/v1
with:
tf2pulumi-version: 0.6.0
- name: Install goreleaser
uses: goreleaser/goreleaser-action@v1
with:
version: latest
args: --version
- name: Ensure dependencies
run: make ensure
- name: Semantic release
Expand Down
4 changes: 3 additions & 1 deletion .goreleaser.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@ env:
- GO111MODULE=on
before:
hooks:
release:
disable: true
builds:
- env:
- CGO_ENABLED=0
Expand All @@ -20,6 +22,6 @@ builds:
snapshot:
name_template: "{{ .Tag }}-SNAPSHOT"
archives:
- name_template: "{{ .Binary }}-}}-{{ .Os }}-{{ .Arch }}"
- name_template: "{{ .Binary }}-v{{ .Tag }}-{{ .Os }}-{{ .Arch }}"
files: [] # Empty

6 changes: 2 additions & 4 deletions .releaserc.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,10 @@
"@semantic-release/commit-analyzer",
"@semantic-release/release-notes-generator",
["@semantic-release/exec", {
"prepareCmd": "VERSION=${nextRelease.version} make provider",
"publishCmd": "VERSION=${nextRelease.version} make publish_provider"
"publishCmd": "VERSION=${nextRelease.version} make build_provider"
}],
["@semantic-release/exec", {
"prepareCmd": "VERSION=${nextRelease.version} make build_node",
"publishCmd": "VERSION=${nextRelease.version} make publish_node"
"publishCmd": "VERSION=${nextRelease.version} make build_node && make publish_node"
}],
["@semantic-release/github", {
"released": ["published"]
Expand Down
7 changes: 5 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -34,11 +34,11 @@ build_node:: tfgen provider
cd ${PACKDIR}/nodejs/ && \
yarn install && \
yarn run tsc && \
sed -i.bak -e "s/\$${VERSION}/$(VERSION)/g" -e "s/\$${PLUGIN_VERSION}/$(VERSION)/g" ./package.json && \
sed -e "s/\$${VERSION}/$(VERSION)/g" -e "s/\$${PLUGIN_VERSION}/$(VERSION)/g" ./package.json && \
cp ../../README.md ../../LICENSE package.json yarn.lock ./bin/

publish_node:: build_node
yarn --cwd sdk/nodejs/bin publish --access public
yarn --cwd sdk/nodejs/bin publish --access public && git clean -fd

build_python:: tfgen provider
cd provider && ./bin/$(TFGEN) python --overlays overlays/python --out ../${PACKDIR}/python/
Expand Down Expand Up @@ -68,6 +68,9 @@ provider:: generate_schema
cd provider && go generate ${PROJECT}/provider/cmd/${PROVIDER}
cd provider && go install -ldflags "-X github.com/${ORG}/pulumi-${PACK}/provider/pkg/version.Version=${VERSION}" ${PROJECT}/provider/cmd/${PROVIDER}

build_provider:: provider
goreleaser release

publish_provider:: provider

lint::
Expand Down
2 changes: 1 addition & 1 deletion sdk/nodejs/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@timmyers/pulumi-github",
"version": "0.0.3",
"version": "0.0.5",
"description": "A Pulumi package for creating and managing github cloud resources.",
"keywords": [
"pulumi",
Expand Down

0 comments on commit 6a84dc2

Please sign in to comment.