Skip to content

⬆️ bump library version to 1.0.0 #4

⬆️ bump library version to 1.0.0

⬆️ bump library version to 1.0.0 #4

Workflow file for this run

name: publish
on:
push:
tags: [ "v*" ]
jobs:
publish:
runs-on: macos-latest
environment: "Maven Repository"
steps:
- uses: actions/checkout@v1
- uses: actions/setup-java@v1
name: setup java
with:
java-version: 11
- name: Publish package
run: |
chmod +x ./gradlew
echo -n "$GPG_PRIVATE_KEY" | base64 --decode > ${GPG_RING_FILE}
SONATYPE_PASSWORD_ESCAPED=$(printf '%s\n' "$SONATYPE_PASSWORD" | sed -e 's/[\/&]/\\&/g')
sed -i -e "s,sonatypeUrl=,sonatypeUrl=$SONATYPE_URL,g" gradle.properties
sed -i -e "s,sonatypeUsername=,sonatypeUsername=$SONATYPE_USERNAME,g" gradle.properties
sed -i -e "s,sonatypePassword=,sonatypePassword=$SONATYPE_PASSWORD_ESCAPED,g" gradle.properties
sed -i -e "s,signing.keyId=,signing.keyId=$GPG_KEY_ID,g" gradle.properties
sed -i -e "s,signing.password=,signing.password=$GPG_PASSWORD,g" gradle.properties
sed -i -e "s,signing.secretKeyRingFile=,signing.secretKeyRingFile=$GPG_RING_FILE,g" gradle.properties
./gradlew build publish --info --stacktrace
env:
GPG_KEY_ID: ${{ secrets.GPG_KEY_ID }}
GPG_PASSWORD: ${{ secrets.GPG_PASSWORD }}
GPG_RING_FILE: ${{ github.workspace }}/key.gpg
GPG_PRIVATE_KEY: ${{ secrets.GPG_PRIVATE_KEY }}
SONATYPE_URL: ${{ secrets.OSSRH_URL }}
SONATYPE_USERNAME: ${{ secrets.OSSRH_USERNAME }}
SONATYPE_PASSWORD: ${{ secrets.OSSRH_TOKEN }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}