fix: publishing to maven - #963
Conversation
kostasniktas
left a comment
There was a problem hiding this comment.
Overall it seems OK to me! Definitely worth trying as an initial go. I got one concrete fix though.
In addition: make sure you're trying to use the latest of all the actions you can find.
The latest hash for the artifactory-oidc is: 4ffc0c647c8d692a8fff24d4f767b207c3d1222e from the main branch. We haven't done an official release in a while. I'll let you know when we do.
| environment: | ||
| name: production | ||
| url: https://central.sonatype.com/artifact/com.twilio.sdk/twilio/${{ github.ref_name }} |
There was a problem hiding this comment.
This block isn't setting an environment variable called name and url. It's telling GitHub to use the environment "production" https://github.com/twilio/twilio-java/settings/environments/19230766429/edit
If you want to add variables to that, you could add them to the environment itself: https://github.com/twilio/twilio-java/settings/environments/
There was a problem hiding this comment.
yes right. added vars to environment.
| strategy: | ||
| matrix: | ||
| java: [ 8, 11, 17, 21 ] | ||
| java: [11, 17, 21] |
There was a problem hiding this comment.
java 8 is lts, add its support.
ci.yml — rewritten as a clean unit-test-only workflow.
Runs on all PRs and pushes.
Fork PRs use ubuntu-latest with no Artifactory; non-fork uses ubuntu-x64 with Artifactory OIDC.
pre-release.yml — new workflow for secrets-heavy operations.
Runs every Monday 8AM PST + manual dispatch. cluster-test job is behind environment: production with all Twilio credentials. deploy-dry-run runs after, builds the release artifact with GPG skipped — no secrets needed there.
test-and-deploy.yml — the publish workflow.
Triggers on tags + manual dispatch. test job runs unit tests on Java 11/17/21 via Artifactory. deploy job is behind environment: production with required human approval — publishes to Maven Central, creates GitHub release, submits Datadog metric.
Testing gist-
cluster tests run
ci run on this repo
once merged, fork repo test PR- #964
Checklist
If you have questions, please file a support ticket, or create a GitHub Issue in this repository.