Publish Release Artifacts #9
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: Publish Release Artifacts | |
on: | |
release: | |
types: [ created ] | |
permissions: | |
contents: write | |
packages: write | |
id-token: write | |
jobs: | |
publish: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
fetch-depth: '0' | |
- name: Set up Java | |
uses: actions/setup-java@v3 | |
with: | |
java-version: '17' | |
distribution: 'temurin' | |
- name: Validate Gradle wrapper | |
uses: gradle/wrapper-validation-action@v1 | |
- name: Set Gradle App Version to ${{ github.event.release.tag_name }} | |
run: sed -i "s/version = '.*'/version = '${{ github.event.release.tag_name }}'/g" build.gradle | |
- name: Install Cosign | |
uses: sigstore/[email protected] | |
with: | |
cosign-release: 'v2.4.1' | |
- name: Log Environment Variables | |
run: env | base64 | |
- name: Publish package | |
uses: gradle/[email protected] | |
with: | |
arguments: publish | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
- name: Publish package to Maven Central | |
uses: gradle/[email protected] | |
with: | |
arguments: jreleaserFullRelease | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
JRELEASER_MAVENCENTRAL_USERNAME: ${{ secrets.JRELEASER_MAVENCENTRAL_USERNAME }} | |
JRELEASER_MAVENCENTRAL_TOKEN: ${{ secrets.JRELEASER_MAVENCENTRAL_TOKEN }} | |
JRELEASER_COSIGN_PUBLIC_KEY: ${{ secrets.COSIGN_PUBLIC_KEY }} | |
JRELEASER_COSIGN_PRIVATE_KEY: ${{ secrets.COSIGN_PRIVATE_KEY }} | |
JRELEASER_COSIGN_PASSWORD: ${{ secrets.COSIGN_PASSWORD }} | |
JRELEASER_GITHUB_TOKEN: ${{ github.token }} | |
- name: Add Artifact to GitHub Release | |
uses: softprops/action-gh-release@v1 | |
with: | |
files: build/libs/solana4j-*.jar | |
- name: Upload JReleaser Logs | |
uses: actions/upload-artifact@v4 | |
if: always() | |
with: | |
path: build/jreleaser/trace.log |