Skip to content

Commit 22a1e26

Browse files
committed
init
0 parents  commit 22a1e26

File tree

200 files changed

+39174
-0
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

200 files changed

+39174
-0
lines changed

.github/release-please-config.json

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
{
2+
"packages": {
3+
".": {
4+
"release-type": "go",
5+
"package-name": "pulumi-clevercloud",
6+
"changelog-path": "CHANGELOG.md",
7+
"bump-minor-pre-major": true,
8+
"bump-patch-for-minor-pre-major": true,
9+
"changelog-sections": [
10+
{ "type": "feat", "section": "Features", "hidden": false },
11+
{ "type": "fix", "section": "Bug Fixes", "hidden": false },
12+
{ "type": "perf", "section": "Performance Improvements", "hidden": false },
13+
{ "type": "revert", "section": "Reverts", "hidden": false },
14+
{ "type": "docs", "section": "Documentation", "hidden": false },
15+
{ "type": "refactor", "section": "Code Refactoring", "hidden": false },
16+
{ "type": "test", "section": "Tests", "hidden": false },
17+
{ "type": "build", "section": "Build System", "hidden": false },
18+
{ "type": "ci", "section": "Continuous Integration", "hidden": false },
19+
{ "type": "chore", "section": "Miscellaneous", "hidden": true },
20+
{ "type": "style", "section": "Styles", "hidden": true }
21+
],
22+
"extra-files": [
23+
{
24+
"type": "json",
25+
"path": "sdk/nodejs/package.json",
26+
"jsonpath": "$.version"
27+
},
28+
{
29+
"type": "json",
30+
"path": "sdk/python/setup.py",
31+
"jsonpath": "$.version"
32+
}
33+
]
34+
}
35+
}
36+
}

.github/workflows/ci.yml

Lines changed: 60 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,60 @@
1+
name: CI
2+
3+
on:
4+
pull_request:
5+
6+
jobs:
7+
build:
8+
name: Build and Test
9+
runs-on: ubuntu-latest
10+
11+
steps:
12+
- name: Checkout code
13+
uses: actions/checkout@v4
14+
15+
- name: Set up Go
16+
uses: actions/setup-go@v5
17+
with:
18+
go-version: '1.24'
19+
cache-dependency-path: provider/go.sum
20+
21+
- name: Download dependencies
22+
working-directory: provider
23+
run: go mod download
24+
25+
- name: Run tests
26+
working-directory: provider
27+
run: go test -v -race -coverprofile=coverage.out ./...
28+
29+
- name: Upload coverage
30+
uses: codecov/codecov-action@v4
31+
with:
32+
files: ./provider/coverage.out
33+
flags: unittests
34+
35+
- name: Build provider
36+
run: make build_provider
37+
38+
- name: Check binary
39+
run: |
40+
ls -lh bin/pulumi-resource-clevercloud
41+
./bin/pulumi-resource-clevercloud --help || true
42+
43+
lint:
44+
name: Lint
45+
runs-on: ubuntu-latest
46+
47+
steps:
48+
- name: Checkout code
49+
uses: actions/checkout@v4
50+
51+
- name: Set up Go
52+
uses: actions/setup-go@v5
53+
with:
54+
go-version: '1.24'
55+
56+
- name: golangci-lint
57+
uses: golangci/golangci-lint-action@v4
58+
with:
59+
version: latest
60+
working-directory: provider
Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
name: Release Please
2+
3+
on:
4+
push:
5+
branches:
6+
- master
7+
8+
permissions:
9+
contents: write
10+
pull-requests: write
11+
12+
jobs:
13+
release-please:
14+
runs-on: ubuntu-latest
15+
steps:
16+
- name: Release Please
17+
uses: googleapis/release-please-action@v4
18+
id: release
19+
with:
20+
# Configuration is in .github/release-please-config.json
21+
# and .release-please-manifest.json
22+
token: ${{ secrets.GITHUB_TOKEN }}
23+
24+
outputs:
25+
release_created: ${{ steps.release.outputs.release_created }}
26+
tag_name: ${{ steps.release.outputs.tag_name }}
27+
version: ${{ steps.release.outputs.version }}

.github/workflows/release.yml

Lines changed: 102 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,102 @@
1+
name: Release
2+
3+
on:
4+
push:
5+
tags:
6+
- 'v*'
7+
8+
permissions:
9+
contents: write
10+
11+
jobs:
12+
release:
13+
name: Create Release
14+
runs-on: ubuntu-latest
15+
16+
steps:
17+
- name: Checkout code
18+
uses: actions/checkout@v4
19+
with:
20+
fetch-depth: 0
21+
22+
- name: Set up Go
23+
uses: actions/setup-go@v5
24+
with:
25+
go-version: '1.24'
26+
27+
- name: Get version
28+
id: version
29+
run: echo "VERSION=${GITHUB_REF#refs/tags/}" >> $GITHUB_OUTPUT
30+
31+
- name: Build provider
32+
run: make build_provider
33+
34+
- name: Create archive
35+
working-directory: bin
36+
run: tar -czf pulumi-resource-clevercloud-${{ steps.version.outputs.VERSION }}-linux-amd64.tar.gz pulumi-resource-clevercloud
37+
38+
- name: Create Release
39+
uses: softprops/action-gh-release@v1
40+
with:
41+
files: |
42+
bin/pulumi-resource-clevercloud-${{ steps.version.outputs.VERSION }}-linux-amd64.tar.gz
43+
generate_release_notes: true
44+
draft: false
45+
prerelease: ${{ contains(steps.version.outputs.VERSION, '-') }}
46+
47+
publish-sdks:
48+
name: Publish SDKs
49+
needs: release
50+
runs-on: ubuntu-latest
51+
if: startsWith(github.ref, 'refs/tags/v') && !contains(github.ref, '-')
52+
53+
steps:
54+
- name: Checkout code
55+
uses: actions/checkout@v4
56+
57+
- name: Set up Go
58+
uses: actions/setup-go@v5
59+
with:
60+
go-version: '1.24'
61+
62+
- name: Set up Node.js
63+
uses: actions/setup-node@v4
64+
with:
65+
node-version: '20'
66+
registry-url: 'https://registry.npmjs.org'
67+
68+
- name: Set up Python
69+
uses: actions/setup-python@v5
70+
with:
71+
python-version: '3.12'
72+
73+
- name: Set up .NET
74+
uses: actions/setup-dotnet@v4
75+
with:
76+
dotnet-version: '8.0'
77+
78+
- name: Build SDKs
79+
run: make build_sdks
80+
81+
# Uncomment when ready to publish
82+
# - name: Publish to npm
83+
# working-directory: sdk/nodejs
84+
# run: npm publish
85+
# env:
86+
# NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
87+
88+
# - name: Publish to PyPI
89+
# working-directory: sdk/python
90+
# run: |
91+
# pip install build twine
92+
# python -m build
93+
# twine upload dist/*
94+
# env:
95+
# TWINE_USERNAME: __token__
96+
# TWINE_PASSWORD: ${{ secrets.PYPI_TOKEN }}
97+
98+
# - name: Publish to NuGet
99+
# working-directory: sdk/dotnet
100+
# run: |
101+
# dotnet pack
102+
# dotnet nuget push bin/Release/*.nupkg --api-key ${{ secrets.NUGET_TOKEN }} --source https://api.nuget.org/v3/index.json

.gitignore

Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
# Binaries
2+
bin/
3+
*.exe
4+
*.dll
5+
*.so
6+
*.dylib
7+
8+
# Test binary
9+
*.test
10+
11+
# Go workspace file
12+
go.work
13+
14+
# Output of the go coverage tool
15+
*.out
16+
17+
# Dependency directories
18+
vendor/
19+
node_modules/
20+
21+
# Pulumi
22+
.pulumi/
23+
Pulumi.*.yaml
24+
25+
# Build artifacts
26+
sdk/nodejs/bin/
27+
sdk/python/build/
28+
sdk/python/dist/
29+
sdk/python/*.egg-info/
30+
sdk/dotnet/bin/
31+
sdk/dotnet/obj/
32+
sdk/go/clevercloud/
33+
sdk/java/target/
34+
35+
# Logs
36+
*.log
37+
38+
# Temp files
39+
tmp/
40+
.tmp/
41+

.release-please-manifest.json

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
{
2+
".": "0.0.1"
3+
}

0 commit comments

Comments
 (0)