test #16
Workflow file for this run
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: Release | |
| on: | |
| push: | |
| tags: | |
| - 'v*' | |
| permissions: | |
| contents: write | |
| # Required for OIDC authentication with PyPI | |
| id-token: write | |
| jobs: | |
| release: | |
| name: Create Release | |
| runs-on: ubuntu-latest | |
| outputs: | |
| version: ${{ steps.version.outputs.VERSION }} | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v4 | |
| with: | |
| fetch-depth: 0 | |
| - name: Set up Go | |
| uses: actions/setup-go@v5 | |
| with: | |
| go-version: '1.24' | |
| cache-dependency-path: provider/go.sum | |
| - name: Install pulumictl | |
| run: | | |
| PULUMICTL_VERSION=v0.0.50 | |
| curl -fsSL https://github.com/pulumi/pulumictl/releases/download/${PULUMICTL_VERSION}/pulumictl-${PULUMICTL_VERSION}-linux-amd64.tar.gz | tar -xz | |
| sudo mv pulumictl /usr/local/bin/ | |
| pulumictl version | |
| - name: Get version | |
| id: version | |
| run: echo "VERSION=${GITHUB_REF#refs/tags/}" >> $GITHUB_OUTPUT | |
| - name: Build provider | |
| run: make build_provider | |
| - name: Create archive | |
| working-directory: bin | |
| run: tar -czf pulumi-resource-clevercloud-${{ steps.version.outputs.VERSION }}-linux-amd64.tar.gz pulumi-resource-clevercloud | |
| - name: Create Release | |
| uses: softprops/action-gh-release@v1 | |
| with: | |
| files: bin/pulumi-resource-clevercloud-${{ steps.version.outputs.VERSION }}-linux-amd64.tar.gz | |
| generate_release_notes: true | |
| draft: false | |
| prerelease: ${{ contains(steps.version.outputs.VERSION, '-') }} | |
| publish-sdks: | |
| name: Publish SDKs | |
| needs: release | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v4 | |
| with: | |
| ref: ${{ needs.release.outputs.version }} | |
| fetch-depth: 0 | |
| - name: Set up Go | |
| uses: actions/setup-go@v5 | |
| with: | |
| go-version: '1.24' | |
| cache-dependency-path: provider/go.sum | |
| - name: Set up Node.js | |
| uses: actions/setup-node@v4 | |
| with: | |
| node-version: '24' | |
| registry-url: 'https://registry.npmjs.org' | |
| - name: Set up Python | |
| uses: actions/setup-python@v5 | |
| with: | |
| python-version: '3.12' | |
| - name: Install pulumictl | |
| run: | | |
| PULUMICTL_VERSION=v0.0.50 | |
| curl -fsSL https://github.com/pulumi/pulumictl/releases/download/${PULUMICTL_VERSION}/pulumictl-${PULUMICTL_VERSION}-linux-amd64.tar.gz | tar -xz | |
| sudo mv pulumictl /usr/local/bin/ | |
| pulumictl version | |
| - name: Install Python build tools | |
| run: pip install build | |
| - name: Set up .NET | |
| uses: actions/setup-dotnet@v4 | |
| with: | |
| dotnet-version: '8.0' | |
| - name: Install pulumictl | |
| run: | | |
| PULUMICTL_VERSION=v0.0.50 | |
| curl -fsSL https://github.com/pulumi/pulumictl/releases/download/${PULUMICTL_VERSION}/pulumictl-${PULUMICTL_VERSION}-linux-amd64.tar.gz | tar -xz | |
| sudo mv pulumictl /usr/local/bin/ | |
| pulumictl version | |
| - name: Build SDKs | |
| run: make build_sdks | |
| - name: Publish to npm | |
| working-directory: sdk/nodejs | |
| run: npm publish --access public --verbose | |
| - name: Publish to PyPI | |
| uses: pypa/gh-action-pypi-publish@release/v1 | |
| with: | |
| packages-dir: sdk/python/dist/ | |
| env: | |
| name: pypi | |
| url: https://pypi.org/p/pulumi-clevercloud | |
| - name: Publish to NuGet | |
| working-directory: sdk/dotnet | |
| run: | | |
| dotnet pack | |
| dotnet nuget push bin/Release/*.nupkg --api-key ${{ secrets.NUGET_TOKEN }} --source https://api.nuget.org/v3/index.json |