Skip to content

fix: attempt manual java publish #18

fix: attempt manual java publish

fix: attempt manual java publish #18

Workflow file for this run

name: Java Tests
on:
push: {}
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: false
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: false
PYPI_PASSWORD: ${{ secrets.PYPI_TOKEN }}
PYPI_USERNAME: "__token__"
# Java SDK
JAVAVERSION: "11"
JAVA_GEN_VERSION: v0.9.4
JAVA_PUBLISH: true
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 }}
SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL }}
jobs:
publish-sdks:
name: Publish ${{ matrix.language }} SDK
runs-on: ubuntu-latest
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/actions@v4
- 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 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 == 'java' && env.JAVA_PUBLISH == 'true' }}
name: Download java SDK
uses: actions/download-artifact@v2
with:
name: java-sdk.tar.gz
path: ${{ github.workspace}}/sdk/
- if: ${{ matrix.language == 'java' && env.JAVA_PUBLISH == 'true' }}
name: Uncompress java SDK
run: tar -zxf ${{github.workspace}}/sdk/java.tar.gz -C
${{github.workspace}}/sdk/java
shell: bash
- 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:
go-version:
- 1.20.1
language:
- java