Skip to content

Commit

Permalink
Release process updates (#274)
Browse files Browse the repository at this point in the history
* WIP

* update

* Enable pyproject for Python SDK. Update versions in the workflows

* Update golangci-lint version
  • Loading branch information
praneetloke authored May 5, 2024
1 parent 40c9ea9 commit 7665f64
Show file tree
Hide file tree
Showing 8 changed files with 46 additions and 56 deletions.
8 changes: 4 additions & 4 deletions .github/workflows/push.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ on:
- "CHANGELOG.md"

env:
GOLANG_CI_LINT_VERSION: v1.54.2
GOLANG_CI_LINT_VERSION: v1.55.2
GOPRIVATE: "github.com/cloudy-sky-software/*"
PROVIDER: "render"

Expand Down Expand Up @@ -67,17 +67,17 @@ jobs:
- name: Setup Node
uses: actions/setup-node@v4
with:
node-version: 18.x
node-version: 20.x

- name: Setup DotNet
uses: actions/setup-dotnet@v4
with:
dotnet-version: 3.1.301
dotnet-version: 6.0.x

- name: Setup Python
uses: actions/setup-python@v5
with:
python-version: 3.9
python-version: 3.11

- name: Install pulumictl
uses: jaxxstorm/[email protected]
Expand Down
8 changes: 4 additions & 4 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ on:
- v*.*.*
- "!v*.*.*-**"
env:
GOLANG_CI_LINT_VERSION: v1.54.2
GOLANG_CI_LINT_VERSION: v1.55.2
GOPRIVATE: "github.com/cloudy-sky-software/*"
PROVIDER: "render"
NPM_TOKEN: ${{ secrets.NPM_AUTOMATION_TOKEN }}
Expand Down Expand Up @@ -187,7 +187,7 @@ jobs:
fail-fast: true
matrix:
dotnetversion:
- 3.1.301
- 6.0.x
goversion:
- 1.21.x
language:
Expand All @@ -196,6 +196,6 @@ jobs:
- dotnet
- go
nodeversion:
- 18.x
- 20.x
pythonversion:
- "3.9"
- "3.11"
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,9 @@ yarn.lock
Pulumi.*.yaml

/sdk/dotnet/version.txt

sdk/python/venv

**/dist

go.work.sum
11 changes: 7 additions & 4 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -67,13 +67,16 @@ python_sdk:: PYPI_VERSION := $(shell pulumictl get version --language python)
python_sdk::
rm -rf sdk/python
$(WORKING_DIR)/bin/$(CODEGEN) -version=${VERSION} python $(SCHEMA_FILE) $(CURDIR)

cp README.md ${PACKDIR}/python/
cd ${PACKDIR}/python/ && \
python3 setup.py clean --all 2>/dev/null && \
rm -rf ./bin/ ../python.bin/ && cp -R . ../python.bin && mv ../python.bin ./bin && \
sed -i.bak -e 's/^VERSION = .*/VERSION = "$(PYPI_VERSION)"/g' -e 's/^PLUGIN_VERSION = .*/PLUGIN_VERSION = "$(VERSION)"/g' ./bin/setup.py && \
rm ./bin/setup.py.bak && \
cd ./bin && python3 setup.py build sdist
sed -i.bak -e 's/^ version = .*/ version = "$(PYPI_VERSION)"/g' ./bin/pyproject.toml && \
rm ./bin/pyproject.toml.bak && \
python3 -m venv venv && \
./venv/bin/python -m pip install build && \
cd ./bin && \
../venv/bin/python -m build .

.PHONY: build
build:: gen provider dotnet_sdk go_sdk nodejs_sdk python_sdk
Expand Down
3 changes: 3 additions & 0 deletions provider/cmd/pulumi-resource-render/schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,9 @@
},
"python": {
"packageName": "pulumi_render",
"pyproject": {
"enabled": true
},
"requires": {
"pulumi": "\u003e=3.0.0,\u003c4.0.0"
}
Expand Down
3 changes: 3 additions & 0 deletions provider/pkg/gen/schema.go
Original file line number Diff line number Diff line change
Expand Up @@ -143,6 +143,9 @@ func PulumiSchema(openAPIDoc openapi3.T) (pschema.PackageSpec, openapigen.Provid
"requires": map[string]string{
"pulumi": ">=3.0.0,<4.0.0",
},
"pyproject": map[string]bool{
"enabled": true,
},
})

metadata := openapigen.ProviderMetadata{
Expand Down
22 changes: 22 additions & 0 deletions sdk/python/pyproject.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
[project]
name = "pulumi_render"
description = "A Pulumi package for creating and managing Render resources."
dependencies = ["parver>=0.2.1", "pulumi>=3.0.0,<4.0.0", "semver>=2.8.1"]
keywords = ["pulumi", "render", "category/cloud", "kind/native"]
readme = "README.md"
requires-python = ">=3.8"
version = "0.0.0"
[project.license]
text = "Apache-2.0"
[project.urls]
Homepage = "https://cloudysky.software"
Repository = "https://github.com/cloudy-sky-software/pulumi-render"

[build-system]
requires = ["setuptools>=61.0"]
build-backend = "setuptools.build_meta"

[tool]
[tool.setuptools]
[tool.setuptools.package-data]
pulumi_render = ["py.typed", "pulumi-plugin.json"]
44 changes: 0 additions & 44 deletions sdk/python/setup.py

This file was deleted.

0 comments on commit 7665f64

Please sign in to comment.