Skip to content
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

BREAKING: Remove installing tools #32

Merged
merged 3 commits into from
Jun 27, 2024
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 11 additions & 8 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,37 +1,40 @@
# pulumi-package-publisher

A composite action for publishing Pulumi packages

_This Action is currently in preview and meant for internal use. Any functionality can and likely will change._

### Purpose

This Action automates setup and publication to the package registries of four Pulumi languages.

### Setup

Ensure the following tools are installed:

- Pulumi CLI
- Go
- Node.js
- Python
- Java (and Gradle)

Set the following environment variables in your Workflow and your GitHub Action secrets:

```yaml
env:
DOTNETVERSION: |
6.0.x
3.1.301
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
GOVERSION: 1.20.1
JAVAVERSION: "11"
NODEVERSION: 16.x
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
NUGET_PUBLISH_KEY: ${{ secrets.NUGET_PUBLISH_KEY }}
PYPI_PASSWORD: ${{ secrets.PYPI_PASSWORD }}
PYTHONVERSION: "3.9"
SIGNING_KEY: ${{ secrets.JAVA_SIGNING_KEY }}
SIGNING_KEY_ID: ${{ secrets.JAVA_SIGNING_KEY_ID }}
SIGNING_PASSWORD: ${{ secrets.JAVA_SIGNING_PASSWORD }}
SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL }}
```

### Use

Add this action to your Workflow as a step to publish to all four supported registries:

- PyPI
- Maven
- npm
Expand Down
20 changes: 0 additions & 20 deletions action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,18 +4,6 @@ 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
assertPrerelease:
description: |
Assert that `version` argument describes a pre-release.
Expand Down Expand Up @@ -71,10 +59,6 @@ runs:
uses: actions/checkout@v3
with:
repository: ${{ github.repository }}
- name: Install Go
uses: actions/setup-go@v3
with:
go-version: ${{ env.GOVERSION }}
- name: Install pulumictl
uses: jaxxstorm/[email protected]
with:
Expand Down Expand Up @@ -104,22 +88,18 @@ runs:
if: (contains(inputs.sdk, 'nodejs') || (contains(inputs.sdk, 'all') && !contains(inputs.sdk, '!all'))) && !contains(inputs.sdk, '!nodejs')
with:
version: ${{ inputs.version }}
node-version: ${{ 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
with:
version: ${{ inputs.version }}
dotnet-version: ${{ 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
with:
version: ${{ inputs.version }}
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
with:
version: ${{ inputs.version }}
java-version: ${{ inputs.java-version }}
7 changes: 0 additions & 7 deletions lang/dotnet/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,17 +9,10 @@ inputs:

TODO: Validate that the SDK we are publishing matches this input.
required: true
dotnet-version:
description: The version of Dotnet being used in the provider
required: true

runs:
using: "composite"
steps:
- name: Setup DotNet
uses: actions/setup-dotnet@v3
with:
dotnet-version: ${{ inputs.dotnet-version }}
- name: Download dotnet SDK
uses: actions/download-artifact@v4
with:
Expand Down
13 changes: 0 additions & 13 deletions lang/java/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,23 +6,10 @@ inputs:
version:
description: The version of the provider being published.
required: true
java-version:
description: The version of Java being used in the provider
required: true

runs:
using: "composite"
steps:
- name: Setup Java
uses: actions/setup-java@v3
with:
cache: gradle
distribution: temurin
java-version: ${{ inputs.java-version }}
- name: Setup Gradle
uses: gradle/gradle-build-action@v2
with:
gradle-version: "7.6"
- name: Download java SDK
uses: actions/download-artifact@v4
with:
Expand Down
8 changes: 0 additions & 8 deletions lang/nodejs/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,18 +6,10 @@ inputs:
version:
description: The version of the provider being published.
required: true
node-version:
description: The version of Node being used in the provider
required: true

runs:
using: "composite"
steps:
- name: Setup Node
uses: actions/setup-node@v3
with:
node-version: ${{ inputs.node-version }}
registry-url: https://registry.npmjs.org
- name: Download nodejs SDK
uses: actions/download-artifact@v4
with:
Expand Down
7 changes: 0 additions & 7 deletions lang/python/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,17 +9,10 @@ inputs:

TODO: Validate that the SDK we are publishing matches this input.
required: true
python-version:
description: The version of Python being used in the provider
required: true

runs:
using: "composite"
steps:
- name: Setup Python
uses: actions/setup-python@v2
with:
python-version: ${{ inputs.python-version }}
- name: Download python SDK
uses: actions/download-artifact@v4
with:
Expand Down