-
Notifications
You must be signed in to change notification settings - Fork 3
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
sdk
include/exclude logic
#21
Merged
Merged
Changes from 3 commits
Commits
Show all changes
8 commits
Select commit
Hold shift + click to select a range
c1e5b3c
Add include/exclude logic to `sdk:`
iwahbe 749cccc
Update README.md
iwahbe a7c541c
Refactor out each language to it's own composite action
iwahbe 357480c
Refactor with absolute path
iwahbe 574fc25
Work around lacking expression support
iwahbe a8cbd70
Attempt fix
iwahbe 5de94eb
Move nested workflows to their own folder
iwahbe a84549b
Fix path
iwahbe File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -43,27 +43,29 @@ steps: | |
uses: pulumi/[email protected] | ||
``` | ||
|
||
Optionally, you may specify language SDKs individually: | ||
Optionally, you may specify language SDKs individually or in a comma separated list: | ||
|
||
```yaml | ||
steps: | ||
- name: Publish nodejs SDK | ||
uses: pulumi/pulumi-package-publisher@0058a106b68d8277f17bbea0cd29b2ff6e671adc | ||
with: | ||
sdk: nodejs | ||
- name: Publish Java SDK | ||
- name: Publish Java and Python SDKs | ||
uses: pulumi/pulumi-package-publisher@0058a106b68d8277f17bbea0cd29b2ff6e671adc | ||
with: | ||
sdk: java | ||
- name: Publish Python SDK | ||
sdk: java,python | ||
- name: Publish every SDK except .NET | ||
uses: pulumi/pulumi-package-publisher@0058a106b68d8277f17bbea0cd29b2ff6e671adc | ||
with: | ||
sdk: python | ||
sdk: all,!dotnet | ||
``` | ||
|
||
Valid inputs to `with.sdk` are: | ||
|
||
- `all` - Equivalent to specifying all supported registries: `python,java,nodejs,dotnet` | ||
- `python` - Publish to PyPI | ||
- `java` - Publish to Maven | ||
- `nodejs` - Publish to npm | ||
- `dotnet` - Publish to nuget | ||
- `!${LANG}` - To disable any of the above languages. |
This file contains 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
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
name: 'Publish to Nuget' | ||
description: 'A subcomponent of pulumi-package-publish' | ||
|
||
runs: | ||
using: "composite" | ||
steps: | ||
- name: Setup DotNet | ||
uses: actions/setup-dotnet@v3 | ||
with: | ||
dotnet-version: ${{ env.DOTNETVERSION }} | ||
- name: Download dotnet SDK | ||
uses: actions/download-artifact@v2 | ||
with: | ||
name: dotnet-sdk.tar.gz | ||
path: ${{ github.workspace }}/sdk/ | ||
- name: Uncompress dotnet SDK | ||
run: tar -zxf ${{ github.workspace }}/sdk/dotnet.tar.gz -C | ||
${{ github.workspace }}/sdk/dotnet | ||
shell: bash | ||
- name: Publish dotnet SDK | ||
run: find "${{ github.workspace }}/sdk/dotnet/bin/Debug/" -name 'Pulumi.*.nupkg' | ||
-exec dotnet nuget push -k "${NUGET_PUBLISH_KEY}" -s https://api.nuget.org/v3/index.json {} \; | ||
shell: bash |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
name: 'Publish to Maven' | ||
description: 'A subcomponent of pulumi-package-publish' | ||
|
||
runs: | ||
using: "composite" | ||
steps: | ||
- name: Setup Java | ||
uses: actions/setup-java@v3 | ||
with: | ||
cache: gradle | ||
distribution: temurin | ||
java-version: ${{ env.JAVAVERSION }} | ||
- name: Setup Gradle | ||
uses: gradle/gradle-build-action@v2 | ||
with: | ||
gradle-version: "7.6" | ||
- name: Download java SDK | ||
uses: actions/download-artifact@v2 | ||
with: | ||
name: java-sdk.tar.gz | ||
path: ${{ github.workspace}}/sdk/ | ||
- name: Uncompress java SDK | ||
run: tar -zxf ${{github.workspace}}/sdk/java.tar.gz -C | ||
${{github.workspace}}/sdk/java | ||
shell: bash | ||
- name: Set PACKAGE_VERSION to Env | ||
run: echo "PACKAGE_VERSION=$(pulumictl get version --language generic)" >> | ||
$GITHUB_ENV | ||
shell: bash | ||
- name: Publish Java SDK | ||
continue-on-error: true | ||
uses: gradle/gradle-build-action@9b814496b50909128c6a52622b416c5ffa04db49 | ||
with: | ||
arguments: publishToSonatype closeAndReleaseSonatypeStagingRepository | ||
build-root-directory: ./sdk/java | ||
gradle-version: 7.4.1 |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
name: 'Publish to NPM' | ||
description: 'A subcomponent of pulumi-package-publish' | ||
|
||
runs: | ||
using: "composite" | ||
steps: | ||
- name: Setup Node | ||
uses: actions/setup-node@v3 | ||
with: | ||
node-version: ${{ env.NODEVERSION }} | ||
registry-url: https://registry.npmjs.org | ||
- name: Download nodejs SDK | ||
uses: actions/download-artifact@v2 | ||
with: | ||
name: nodejs-sdk.tar.gz | ||
path: ${{ github.workspace }}/sdk/ | ||
- name: Uncompress nodejs SDK | ||
run: tar -zxf ${{ github.workspace }}/sdk/nodejs.tar.gz -C | ||
${{ github.workspace }}/sdk/nodejs | ||
shell: bash | ||
- name: Run npm whoami | ||
run: npm whoami | ||
shell: bash | ||
env: | ||
NODE_AUTH_TOKEN: ${{ env.NODE_AUTH_TOKEN }} | ||
- name: Publish Node | ||
run: pulumi package publish-sdk nodejs --path ${{ github.workspace }}/sdk/nodejs/bin | ||
shell: bash | ||
env: | ||
NODE_AUTH_TOKEN: ${{ env.NODE_AUTH_TOKEN }} |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
name: 'Publish to PyPi' | ||
description: 'A subcomponent of pulumi-package-publish' | ||
|
||
runs: | ||
using: "composite" | ||
steps: | ||
- name: Setup Python | ||
uses: actions/setup-python@v2 | ||
with: | ||
python-version: ${{ env.PYTHONVERSION }} | ||
- name: Download python SDK | ||
uses: actions/download-artifact@v2 | ||
with: | ||
name: python-sdk.tar.gz | ||
path: ${{ github.workspace }}/sdk/ | ||
- name: Uncompress python SDK | ||
run: tar -zxf ${{ github.workspace }}/sdk/python.tar.gz -C | ||
${{ github.workspace }}/sdk/python | ||
shell: bash | ||
- name: Install Twine | ||
run: python -m pip install pip twine | ||
shell: bash | ||
- name: Publish Python SDK | ||
run: if [ -n "${PYPI_USERNAME}" ] ; | ||
then PYPI_PUBLISH_USERNAME=${PYPI_USERNAME}; | ||
else PYPI_PUBLISH_USERNAME="pulumi"; | ||
fi && | ||
echo "Publishing Pip package to pypi as ${PYPI_PUBLISH_USERNAME}:" && | ||
twine upload | ||
-u "${PYPI_PUBLISH_USERNAME}" -p "${PYPI_PASSWORD}" | ||
"${{ github.workspace }}/sdk/python/bin/dist/*" | ||
--skip-existing | ||
--verbose | ||
shell: bash |
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
non-blocking: probably will want to remove the explicit version tagging here and elsewhere, or use
@main