Skip to content

Commit

Permalink
Merge pull request #9 from pulumiverse/chore-fix-release
Browse files Browse the repository at this point in the history
update: main workflow
  • Loading branch information
videmsky authored Aug 24, 2024
2 parents da65f35 + 0ecd5a5 commit c355cb9
Show file tree
Hide file tree
Showing 4 changed files with 204 additions and 397 deletions.
42 changes: 42 additions & 0 deletions .github/renovate.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
{
"$schema": "https://docs.renovatebot.com/renovate-schema.json",
"extends": [
"helpers:pinGitHubActionDigests",
"group:githubArtifactActions",
"schedule:earlyMondays"
],
"constraints": {
"go": "1.22"
},
"packageRules": [
{
"matchFileNames": [
"provider/**"
],
"matchDatasources": [
"go"
],
"excludePackagePrefixes": [
"github.com/hashicorp/terraform-plugin-sdk",
"github.com/pulumi/pulumi",
"github.com/redpanda-data/terraform-provider-redpanda"
],
"enabled": true
},
{
"matchFileNames": [
"examples/**"
],
"matchDatasources": [
"go"
]
},
{
"matchFileNames": [
"sdk/**"
],
"enabled": false
}
],
"dependencyDashboard": true
}
109 changes: 48 additions & 61 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,47 +12,56 @@ env:
PYPI_PASSWORD: ${{ secrets.PYPI_API_TOKEN }}
PYPI_USERNAME: "__token__"
TRAVIS_OS_NAME: linux
DOTNETVERSION: |
6.0.x
3.1.301
GOVERSION: 1.22.x
GRADLEVERSION: "7.6"
JAVAVERSION: "11"
NODEVERSION: 20.x
PYTHONVERSION: 3.11.8

jobs:
build_sdk:
name: build_sdk
needs: prerequisites
runs-on: ubuntu-latest
steps:
- name: Checkout Repo
uses: actions/checkout@v3
uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4
- name: Checkout Scripts Repo
uses: actions/checkout@v3
uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4
with:
path: ci-scripts
repository: jaxxstorm/scripts
ref: third_party
- name: Unshallow clone for tags
run: git fetch --prune --unshallow --tags
- name: Install Go
uses: actions/setup-go@v5
uses: actions/setup-go@0a12ed9d6a96ab950c8f026ed9f722fe0da7ef32 # v5
with:
go-version: ${{matrix.goversion}}
go-version: ${{ env.GOVERSION }}
- name: Install pulumictl
uses: jaxxstorm/action-install-gh-release@v1.9.0
uses: jaxxstorm/action-install-gh-release@25d5e2dd555cd74f1fab9ac1e6ea117acde2c0c4 # v1.12.0
with:
repo: pulumi/pulumictl
- name: Install Pulumi CLI
uses: pulumi/action-install-pulumi-cli@v2
uses: pulumi/action-install-pulumi-cli@b374ceb6168550de27c6eba92e01c1a774040e11 # v2
- name: Setup Node
uses: actions/setup-node@v4
uses: actions/setup-node@1e60f620b9541d16bece96c5465dc8ee9832be0b # v4
with:
node-version: ${{matrix.nodeversion}}
node-version: ${{ env.NODEVERSION }}
registry-url: https://registry.npmjs.org
- name: Setup DotNet
uses: actions/setup-dotnet@v3
uses: actions/setup-dotnet@6bd8b7f7774af54e05809fcc5431931b3eb1ddee # v4
with:
dotnet-version: ${{matrix.dotnetversion}}
dotnet-version: ${{ env.DOTNETVERSION }}
- name: Setup Python
uses: actions/setup-python@v4
uses: actions/setup-python@39cd14951b08e74b54015e9e001cdefcf80e669f # v5
with:
python-version: ${{matrix.pythonversion}}
python-version: ${{ env.PYTHONVERSION }}
- name: Download provider + tfgen binaries
uses: actions/download-artifact@v3
uses: actions/download-artifact@fa0a91b85d4f404e444e00e005971372dc801d16 # v4
with:
name: ${{ env.PROVIDER }}-provider.tar.gz
path: ${{ github.workspace }}/bin
Expand All @@ -72,53 +81,46 @@ jobs:
run: tar -zcf sdk/${{ matrix.language }}.tar.gz -C sdk/${{ matrix.language }}
.
- name: Upload artifacts
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@834a144ee995460fba8ed112a2fc961b36a5ec5a # v4
with:
name: ${{ matrix.language }}-sdk.tar.gz
path: ${{ github.workspace}}/sdk/${{ matrix.language }}.tar.gz
strategy:
fail-fast: true
matrix:
dotnetversion:
- 3.1.301
goversion:
- 1.22.x
language:
- nodejs
- python
- dotnet
- go
nodeversion:
- 18.x
pythonversion:
- "3.9"

prerequisites:
name: prerequisites
runs-on: ubuntu-latest
steps:
- name: Checkout Repo
uses: actions/checkout@v3
uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4
- name: Checkout Scripts Repo
uses: actions/checkout@v3
uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4
with:
path: ci-scripts
repository: jaxxstorm/scripts
ref: third_party
- name: Unshallow clone for tags
run: git fetch --prune --unshallow --tags
- name: Install Go
uses: actions/setup-go@v5
uses: actions/setup-go@0a12ed9d6a96ab950c8f026ed9f722fe0da7ef32 # v5
with:
go-version: ${{matrix.goversion}}
go-version: ${{ env.GOVERSION }}
- name: Install pulumictl
uses: jaxxstorm/action-install-gh-release@v1.9.0
uses: jaxxstorm/action-install-gh-release@25d5e2dd555cd74f1fab9ac1e6ea117acde2c0c4 # v1.12.0
with:
repo: pulumi/pulumictl
- name: Install Pulumi CLI
uses: pulumi/action-install-pulumi-cli@v2
uses: pulumi/action-install-pulumi-cli@b374ceb6168550de27c6eba92e01c1a774040e11 # v2
- if: github.event_name == 'pull_request'
name: Install Schema Tools
uses: jaxxstorm/action-install-gh-release@v1.9.0
uses: jaxxstorm/action-install-gh-release@25d5e2dd555cd74f1fab9ac1e6ea117acde2c0c4 # v1.12.0
with:
repo: mikhailshilkov/schema-tools
- name: Build tfgen & provider binaries
Expand All @@ -143,61 +145,53 @@ jobs:
}}/bin/ pulumi-resource-${{ env.PROVIDER }} pulumi-tfgen-${{ env.PROVIDER
}}
- name: Upload artifacts
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@834a144ee995460fba8ed112a2fc961b36a5ec5a # v4
with:
name: ${{ env.PROVIDER }}-provider.tar.gz
path: ${{ github.workspace }}/bin/provider.tar.gz
strategy:
fail-fast: true
matrix:
dotnetversion:
- 3.1.301
goversion:
- 1.22.x
nodeversion:
- 18.x
pythonversion:
- "3.9"

test:
name: test
needs: build_sdk
runs-on: ubuntu-latest
steps:
- name: Checkout Repo
uses: actions/checkout@v3
uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4
- name: Checkout Scripts Repo
uses: actions/checkout@v3
uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4
with:
path: ci-scripts
repository: jaxxstorm/scripts
ref: third_party
- name: Unshallow clone for tags
run: git fetch --prune --unshallow --tags
- name: Install Go
uses: actions/setup-go@v5
uses: actions/setup-go@0a12ed9d6a96ab950c8f026ed9f722fe0da7ef32 # v5
with:
go-version: ${{matrix.goversion}}
go-version: ${{ env.GOVERSION }}
- name: Install pulumictl
uses: jaxxstorm/action-install-gh-release@v1.9.0
uses: jaxxstorm/action-install-gh-release@25d5e2dd555cd74f1fab9ac1e6ea117acde2c0c4 # v1.12.0
with:
repo: pulumi/pulumictl
- name: Install Pulumi CLI
uses: pulumi/action-install-pulumi-cli@v2
uses: pulumi/action-install-pulumi-cli@b374ceb6168550de27c6eba92e01c1a774040e11 # v2
- name: Setup Node
uses: actions/setup-node@v4
uses: actions/setup-node@1e60f620b9541d16bece96c5465dc8ee9832be0b # v4
with:
node-version: ${{matrix.nodeversion}}
node-version: ${{ env.NODEVERSION }}
registry-url: https://registry.npmjs.org
- name: Setup DotNet
uses: actions/setup-dotnet@v3
uses: actions/setup-dotnet@6bd8b7f7774af54e05809fcc5431931b3eb1ddee # v4
with:
dotnet-version: ${{matrix.dotnetversion}}
dotnet-version: ${{ env.DOTNETVERSION }}
- name: Setup Python
uses: actions/setup-python@v4
uses: actions/setup-python@39cd14951b08e74b54015e9e001cdefcf80e669f # v5
with:
python-version: ${{matrix.pythonversion}}
python-version: ${{ env.PYTHONVERSION }}
- name: Download provider + tfgen binaries
uses: actions/download-artifact@v3
uses: actions/download-artifact@fa0a91b85d4f404e444e00e005971372dc801d16 # v4
with:
name: ${{ env.PROVIDER }}-provider.tar.gz
path: ${{ github.workspace }}/bin
Expand All @@ -207,7 +201,7 @@ jobs:
find ${{ github.workspace }} -name "pulumi-*-${{ env.PROVIDER }}" -print -exec chmod +x {} \;
- run: dotnet nuget add source ${{ github.workspace }}/nuget
- name: Download SDK
uses: actions/download-artifact@v3
uses: actions/download-artifact@fa0a91b85d4f404e444e00e005971372dc801d16 # v4
with:
name: ${{ matrix.language }}-sdk.tar.gz
path: ${{ github.workspace}}/sdk/
Expand All @@ -227,19 +221,12 @@ jobs:
strategy:
fail-fast: true
matrix:
dotnetversion:
- 3.1.301
goversion:
- 1.22.x
language:
- nodejs
- python
- dotnet
- go
nodeversion:
- 18.x
pythonversion:
- "3.9"

permissions:
contents: write

Expand Down
Loading

0 comments on commit c355cb9

Please sign in to comment.