Skip to content

Commit

Permalink
add dotnet sdk
Browse files Browse the repository at this point in the history
  • Loading branch information
philipkrueck committed Apr 1, 2024
1 parent a9a9928 commit b8ad086
Show file tree
Hide file tree
Showing 59 changed files with 4,318 additions and 25 deletions.
30 changes: 15 additions & 15 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,9 @@ env:
# IF YOU NEED TO PUBLISH A NUGET PACKAGE THEN ENSURE AN NUGET_PUBLISH_KEY
# SECRET IS SET AND PUBLISH_NUGET: TRUE. IF YOU WANT TO PUBLISH TO AN ALTERNATIVE
# NPM REGISTRY THEN ENSURE THE NPM_REGISTRY_URL IS CHANGED
# NUGET_PUBLISH_KEY: ${{ YOUR NUGET PUBLISH KEY HERE }}
# NUGET_FEED_URL: https://api.nuget.org/v3/index.json
# PUBLISH_NUGET: true
NUGET_PUBLISH_KEY: ${{ secrets.NUGET_PUBLISH_KEY }}
NUGET_FEED_URL: https://api.nuget.org/v3/index.json
PUBLISH_NUGET: true
# IF YOU NEED TO PUBLISH A PYPI PACKAGE SET PUBLISH_PYPI: TRUE AND CHANGE PYPI_PASSWORD, PYPI_USERNAME TO YOUR CREDENTIALS.
# IF YOU WANT TO PUBLISH TO AN ALTERNATIVE PYPI REGISTRY THEN ENSURE THE PYPI_REPOSITORY_URL IS SET.
#
Expand Down Expand Up @@ -82,10 +82,10 @@ jobs:
with:
node-version: ${{matrix.nodeversion}}
registry-url: ${{env.NPM_REGISTRY_URL}}
# - name: Setup DotNet
# uses: actions/setup-dotnet@v4
# with:
# dotnet-version: ${{matrix.dotnetversion}}
- name: Setup DotNet
uses: actions/setup-dotnet@v4
with:
dotnet-version: ${{matrix.dotnetversion}}
- name: Setup Python
uses: actions/setup-python@v5
with:
Expand All @@ -112,11 +112,11 @@ jobs:
access: "public"
token: ${{ env.NPM_TOKEN }}
package: ${{github.workspace}}/sdk/nodejs/bin/package.json
# - if: ${{ matrix.language == 'dotnet' && env.PUBLISH_NUGET == 'true' }}
# name: publish nuget package
# run: |
# dotnet nuget push ${{github.workspace}}/sdk/dotnet/bin/Debug/*.nupkg -s ${{ env.NUGET_FEED_URL }} -k ${{ env.NUGET_PUBLISH_KEY }}
# echo "done publishing packages"
- if: ${{ matrix.language == 'dotnet' && env.PUBLISH_NUGET == 'true' }}
name: publish nuget package
run: |
dotnet nuget push ${{github.workspace}}/sdk/dotnet/bin/Debug/*.nupkg -s ${{ env.NUGET_FEED_URL }} -k ${{ env.NUGET_PUBLISH_KEY }}
echo "done publishing packages"
- name: Publish SDKs
if: ${{ matrix.language }} != 'go'
uses: pulumi/[email protected]
Expand All @@ -129,12 +129,12 @@ jobs:
- nodejs
- python
- go
# - dotnet
- dotnet
goversion:
- 1.22.x
nodeversion:
- 20.x
pythonversion:
- "3.9"
# dotnetversion:
# - 3.1.301
dotnetversion:
- 3.1.301
18 changes: 9 additions & 9 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -12,13 +12,13 @@ VERSION_PATH := ${PROVIDER_PATH}/pkg/version.Version
TFGEN := pulumi-tfgen-${PACK}
PROVIDER := pulumi-resource-${PACK}

VERSION := v0.0.9
VERSION := v0.0.10

TESTPARALLELISM := 4

WORKING_DIR := $(shell pwd)

.PHONY: development provider build_sdks build_nodejs build_go build_python cleanup # build_dotnet
.PHONY: development provider build_sdks build_nodejs build_go build_python build_dotnet cleanup

development:: install_plugins provider lint_provider build_sdks install_sdks cleanup # Build the provider & SDKs for a development environment

Expand Down Expand Up @@ -58,13 +58,13 @@ build_python:: install_plugins tfgen # build the python sdk
rm ./bin/setup.py.bak && \
cd ./bin && python3 setup.py build sdist

# build_dotnet:: DOTNET_VERSION := $(shell pulumictl get version --language dotnet)
# build_dotnet:: install_plugins tfgen # build the dotnet sdk
# pulumictl get version --language dotnet
# $(WORKING_DIR)/bin/$(TFGEN) dotnet --overlays provider/overlays/dotnet --out sdk/dotnet/
# cd sdk/dotnet/ && \
# echo "${DOTNET_VERSION}" >version.txt && \
# dotnet build /p:Version=${DOTNET_VERSION}
build_dotnet:: DOTNET_VERSION := $(shell pulumictl get version --language dotnet)
build_dotnet:: install_plugins tfgen # build the dotnet sdk
pulumictl get version --language dotnet
$(WORKING_DIR)/bin/$(TFGEN) dotnet --overlays provider/overlays/dotnet --out sdk/dotnet/
cd sdk/dotnet/ && \
echo "${DOTNET_VERSION}" >version.txt && \
dotnet build /p:Version=${DOTNET_VERSION}

build_go:: install_plugins tfgen # build the go sdk
$(WORKING_DIR)/bin/$(TFGEN) go --overlays provider/overlays/go --out sdk/go/
Expand Down
8 changes: 8 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,14 @@ To use from Go, use `go get` to grab the latest version of the library:
go get github.com/genesiscloud/pulumi-genesiscloud/sdk/go/...
```

### .NET

To use from .NET, install using `dotnet add package`:

```
dotnet add package GenesisCloud.PulumiGenesisCloud
```

## Configuration

The following configuration points are available:
Expand Down
9 changes: 8 additions & 1 deletion docs/_index.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ The Genesis Cloud provider must be configured with credentials to deploy and upd

## Example

{{< chooser language "typescript,python,go" >}}
{{< chooser language "typescript,python,go,dotnet" >}}
{{% choosable language typescript %}}

```typescript
Expand Down Expand Up @@ -65,6 +65,13 @@ func main() {
}
```

{{% /choosable %}}
{{% choosable language dotnet %}}

```dotnet
TODO: add this
```

{{% /choosable %}}

{{< /chooser >}}
Loading

0 comments on commit b8ad086

Please sign in to comment.