Skip to content

Commit

Permalink
Use explicit inputs for languages (#28)
Browse files Browse the repository at this point in the history
Fixes #27.

Testing this via pulumi/pulumi-civo#515.
  • Loading branch information
guineveresaenger authored Jun 6, 2024
1 parent 753b788 commit d34ff1b
Show file tree
Hide file tree
Showing 5 changed files with 24 additions and 4 deletions.
20 changes: 20 additions & 0 deletions action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,18 @@ inputs:
version:
description: The version of the provider being published.
required: true
dotnet-version:
description: The version of Dotnet being used in the provider
required: true
java-version:
description: The version of Java being used in the provider
required: true
node-version:
description: The version of Node being used in the provider
required: true
python-version:
description: The version of Python being used in the provider
required: true
sdk:
description: |
The name of the language SDK being published.
Expand Down Expand Up @@ -76,14 +88,22 @@ runs:
- name: Nodejs - Publish to NPM
uses: ./.pulumi-package-publish/lang/nodejs
if: (contains(inputs.sdk, 'nodejs') || (contains(inputs.sdk, 'all') && !contains(inputs.sdk, '!all'))) && !contains(inputs.sdk, '!nodejs')
env:
NODE_VERSTION: ${{ inputs.node-version }}
- name: .NET - Publish to Nuget
if: (contains(inputs.sdk, 'dotnet') || (contains(inputs.sdk, 'all') && !contains(inputs.sdk, '!all'))) && !contains(inputs.sdk, '!dotnet')
uses: ./.pulumi-package-publish/lang/dotnet
env:
DOTNET_VERSTION: ${{ inputs.dotnet-version }}
- name: Python - Publish to PyPi
if: (contains(inputs.sdk, 'python') || (contains(inputs.sdk, 'all') && !contains(inputs.sdk, '!all'))) && !contains(inputs.sdk, '!python')
uses: ./.pulumi-package-publish/lang/python
env:
PYTHON_VERSION: ${{ inputs.python-version }}
- name: Java - Publish to Maven
if: (contains(inputs.sdk, 'java') || (contains(inputs.sdk, 'all') && !contains(inputs.sdk, '!all'))) && !contains(inputs.sdk, '!java')
uses: ./.pulumi-package-publish/lang/java
env:
PROVIDER_VERSION: ${{ inputs.version }}
JAVA_VERSION: ${{ inputs.java-version }}

2 changes: 1 addition & 1 deletion lang/dotnet/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ runs:
- name: Setup DotNet
uses: actions/setup-dotnet@v3
with:
dotnet-version: ${{ env.DOTNETVERSION }}
dotnet-version: ${{ env.DOTNET_VERSION }}
- name: Download dotnet SDK
uses: actions/download-artifact@v4
with:
Expand Down
2 changes: 1 addition & 1 deletion lang/java/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ runs:
with:
cache: gradle
distribution: temurin
java-version: ${{ env.JAVAVERSION }}
java-version: ${{ env.JAVA_VERSION }}
- name: Setup Gradle
uses: gradle/gradle-build-action@v2
with:
Expand Down
2 changes: 1 addition & 1 deletion lang/nodejs/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ runs:
- name: Setup Node
uses: actions/setup-node@v3
with:
node-version: ${{ env.NODEVERSION }}
node-version: ${{ env.NODE_VERSION }}
registry-url: https://registry.npmjs.org
- name: Download nodejs SDK
uses: actions/download-artifact@v4
Expand Down
2 changes: 1 addition & 1 deletion lang/python/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ runs:
- name: Setup Python
uses: actions/setup-python@v2
with:
python-version: ${{ env.PYTHONVERSION }}
python-version: ${{ env.PYTHON_VERSION }}
- name: Download python SDK
uses: actions/download-artifact@v4
with:
Expand Down

0 comments on commit d34ff1b

Please sign in to comment.