Skip to content

Commit

Permalink
Publish from GitHub Actions
Browse files Browse the repository at this point in the history
  • Loading branch information
hiroyuki-sato committed May 13, 2024
1 parent 0f397b6 commit 2c254fe
Showing 1 changed file with 32 additions and 0 deletions.
32 changes: 32 additions & 0 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
name: Publish
on:
push:
tags:
- "v0.*"
jobs:
publish:
environment:
name: maven-central-and-ruby-gems
runs-on: ubuntu-latest
strategy:
fail-fast: true
steps:
- uses: actions/checkout@v4
- name: Set up OpenJDK 8
uses: actions/setup-java@v4
with:
java-version: 8
distribution: "temurin"
- name: Publish
run: |
mkdir -p $HOME/.gem
touch $HOME/.gem/credentials
chmod 0600 $HOME/.gem/credentials
printf -- "---\n:rubygems_api_key: ${RUBYGEMS_API_KEY}\n" > $HOME/.gem/credentials
./gradlew --stacktrace publishMavenPublicationToMavenCentralRepository gemPush
env:
ORG_GRADLE_PROJECT_ossrhUsername: ${{ vars.OSSRH_USERNAME }}
ORG_GRADLE_PROJECT_ossrhPassword: ${{ secrets.OSSRH_PASSWORD }}
ORG_GRADLE_PROJECT_signingKey: ${{ secrets.GPG_PRIVATE_KEY_ARMOR }}
ORG_GRADLE_PROJECT_signingPassword: ${{ secrets.GPG_PRIVATE_KEY_PASSWORD }}
RUBYGEMS_API_KEY: "${{secrets.RUBYGEMS_API_KEY}}"

0 comments on commit 2c254fe

Please sign in to comment.