fix: remove java test build #42
Workflow file for this run
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
name: release | |
on: | |
push: | |
tags: | |
- v*.*.* | |
permissions: | |
contents: write | |
env: | |
PROVIDER: rediscloud | |
TF_APPEND_USER_AGENT: pulumi | |
# GitHub Release Artifacts (Provider) | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
# Go SDK | |
PULUMI_GO_DEP_ROOT: ${{ github.workspace }}/.. | |
# NodeJS SDK | |
NPM_PUBLISH: true | |
NPM_TOKEN: ${{ secrets.NPM_TOKEN }} | |
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} | |
# dotNet SDK | |
NUGET_PUBLISH: false | |
NUGET_API_KEY: ${{ secrets.NUGET_API_KEY }} | |
NUGET_FEED_URL: https://api.nuget.org/v3/index.json | |
PULUMI_LOCAL_NUGET: ${{ github.workspace }}/nuget | |
# Python SDK | |
PYPI_PUBLISH: true | |
PYPI_PASSWORD: ${{ secrets.PYPI_TOKEN }} | |
PYPI_USERNAME: "__token__" | |
# Java SDK | |
JAVAVERSION: "11" | |
JAVA_GEN_VERSION: v0.9.4 | |
JAVA_PUBLISH: "false" | |
PUBLISH_REPO_PASSWORD: ${{ secrets.OSSRH_PASSWORD }} | |
PUBLISH_REPO_USERNAME: ${{ secrets.OSSRH_USERNAME }} | |
SIGNING_KEY: ${{ secrets.JAVA_SIGNING_KEY }} | |
SIGNING_KEY_ID: ${{ secrets.JAVA_SIGNING_KEY_ID }} | |
SIGNING_PASSWORD: ${{ secrets.JAVA_SIGNING_PASSWORD }}\ | |
jobs: | |
publish-provider: | |
name: publish | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout Repo | |
uses: actions/checkout@8e5e7e5ab8b370d6c329ec480221332ada57f0ab # tag=v3.5.2 | |
- name: Set Tag Version | |
run: echo "GORELEASER_CURRENT_TAG=${GITHUB_REF#refs/*/}" >> $GITHUB_ENV | |
- name: Unshallow clone for tags | |
run: git fetch --prune --unshallow --tags | |
- name: Install Go | |
uses: actions/setup-go@4d34df0c2316fe8122ab82dc22947d607c0c91f9 # tag=v4.0.0 | |
with: | |
go-version: ${{matrix.goversion}} | |
- name: Install pulumictl | |
uses: jaxxstorm/action-install-gh-release@c5ead9a448b4660cf1e7866ee22e4dc56538031a # tag=v1.10.0 | |
with: | |
repo: pulumi/pulumictl | |
tag: v0.0.43 | |
- name: Run GoReleaser | |
uses: goreleaser/goreleaser-action@f82d6c1c344bcacabba2c841718984797f664a6b # tag=v4.2.0 | |
with: | |
args: -p 3 release --rm-dist | |
version: latest | |
- name: Create ag | |
uses: actions/github-script@d7906e4ad0b1822421a7e6a35d5ca353c962f410 # tag=v6.4.1 | |
with: | |
script: | | |
github.rest.git.createRef({ | |
owner: context.repo.owner, | |
repo: context.repo.repo, | |
ref: 'refs/tags/sdk/${{ github.ref_name }}', | |
sha: context.sha | |
}) | |
strategy: | |
fail-fast: true | |
matrix: | |
goversion: | |
- 1.19.x | |
publish-sdks: | |
name: Publish ${{ matrix.language }} SDK | |
runs-on: ubuntu-latest | |
needs: publish-provider | |
steps: | |
- name: Checkout Repo | |
uses: actions/checkout@8e5e7e5ab8b370d6c329ec480221332ada57f0ab # tag=v3.5.2 | |
- name: Unshallow clone for tags | |
run: git fetch --prune --unshallow --tags | |
- name: Install Go | |
uses: actions/setup-go@4d34df0c2316fe8122ab82dc22947d607c0c91f9 # tag=v4.0.0 | |
with: | |
go-version: ${{ matrix.goversion }} | |
- name: Install pulumictl | |
uses: jaxxstorm/action-install-gh-release@c5ead9a448b4660cf1e7866ee22e4dc56538031a # tag=v1.10.0 | |
with: | |
repo: pulumi/pulumictl | |
tag: v0.0.43 | |
- name: Install Pulumi CLI | |
uses: pulumi/action-install-pulumi-cli@b374ceb6168550de27c6eba92e01c1a774040e11 # tag=v2.0.0 | |
- name: pulumi-java-gen | |
run: mkdir -p bin && pulumictl download-binary -n pulumi-language-java -v v0.9.4 -r pulumi/pulumi-java | |
- name: AWS Provider | |
run: pulumi plugin install resource aws 5.40.0 | |
- name: Google Provider | |
run: pulumi plugin install resource gcp 6.55.1 | |
- name: Setup Node | |
uses: actions/setup-node@64ed1c7eab4cce3362f8c340dee64e5eaeef8f7c # tag=v3.6.0 | |
with: | |
node-version: ${{matrix.nodeversion}} | |
registry-url: ${{env.NPM_REGISTRY_URL}} | |
- name: Setup DotNet | |
uses: actions/setup-dotnet@607fce577a46308457984d59e4954e075820f10a # tag=v2.1.0 | |
with: | |
dotnet-version: ${{matrix.dotnetverson}} | |
- name: Setup Python | |
uses: actions/setup-python@57ded4d7d5e986d7296eab16560982c6dd7c923b # tag=v4.2.0 | |
with: | |
python-version: ${{matrix.pythonversion}} | |
- name: Setup Java | |
uses: actions/setup-java@v3 | |
with: | |
distribution: temurin | |
java-version: ${{ env.JAVAVERSION }} | |
- name: Setup Gradle | |
uses: gradle/gradle-build-action@v2 | |
with: | |
gradle-version: "7.6" | |
- name: Build SDK | |
run: make build_${{ matrix.language }} | |
- name: Check worktree clean | |
run: | | |
git update-index -q --refresh | |
if ! git diff-files --quiet; then | |
>&2 echo "error: working tree is not clean, aborting!" | |
git status | |
git diff | |
exit 1 | |
fi | |
- if: ${{ matrix.language == 'python' && env.PYPI_PUBLISH == 'true' }} | |
name: Publish PyPI | |
uses: pypa/gh-action-pypi-publish@a56da0b891b3dc519c7ee3284aff1fad93cc8598 # tag=v1.8.6 | |
with: | |
user: ${{ env.PYPI_USERNAME }} | |
password: ${{ env.PYPI_PASSWORD }} | |
packages-dir: ${{github.workspace}}/sdk/python/bin/dist | |
- if: ${{ matrix.language == 'nodejs' && env.NPM_PUBLISH == 'true' }} | |
uses: JS-DevTools/npm-publish@541aa6b21b4a1e9990c95a92c21adc16b35e9551 # tag=v2.1.0 | |
with: | |
access: "public" | |
token: ${{ env.NPM_TOKEN }} | |
package: ${{github.workspace}}/sdk/nodejs/bin/package.json | |
- if: ${{ matrix.language == 'dotnet' && env.NUGET_PUBLISH == 'true' }} | |
name: publish nuget package | |
run: | | |
dotnet nuget push ${{github.workspace}}/sdk/dotnet/bin/Debug/*.nupkg -s ${{ env.NUGET_FEED_URL }} -k ${{ env.NUGET_API_KEY }} | |
echo "done publishing packages" | |
- if: ${{ matrix.language == 'java' && env.JAVA_PUBLISH == 'true' }} | |
name: Set PACKAGE_VERSION to Env | |
run: echo "PACKAGE_VERSION=$(pulumictl get version --language generic)" >> | |
$GITHUB_ENV | |
shell: bash | |
- if: ${{ matrix.language == 'java' && env.JAVA_PUBLISH == 'true' }} | |
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 | |
strategy: | |
fail-fast: true | |
matrix: | |
dotnetversion: | |
- 3.1.301 | |
goversion: | |
- 1.20.x | |
language: | |
- nodejs | |
- python | |
- dotnet | |
- go | |
- java | |
nodeversion: | |
- 16.x | |
pythonversion: | |
- "3.9" |