Skip to content

Merge pull request #15 from yas-okadatech/fix-error-handler #30

Merge pull request #15 from yas-okadatech/fix-error-handler

Merge pull request #15 from yas-okadatech/fix-error-handler #30

Workflow file for this run

name: main
on:
push:
branches:
- 'master'
tags:
- '*'
pull_request:
branches:
- 'master'
types: [opened, synchronize]
workflow_dispatch:
jobs:
main:
runs-on: ubuntu-latest
permissions:
packages: write
contents: read
steps:
- uses: actions/checkout@v1
- name: Set up JDK 1.8
uses: actions/setup-java@v1
with:
java-version: 1.8
- name: lint
# Run ./gradlew spotlessApply when failing on this step.
run: ./gradlew spotlessCheck
- run: ./gradlew test
- name: Show Current Version
run: ./gradlew printVersion
- name: Build Gem & Put it into './pkg/' Directory
run: ./gradlew gem
- name: Set up JRuby
uses: ruby/setup-ruby@v1
with:
ruby-version: jruby
- name: Publish to GPR
if: startsWith( github.ref, 'refs/tags/' ) || github.event_name == 'workflow_dispatch'
run: |
mkdir -p $HOME/.gem
touch $HOME/.gem/credentials
chmod 0600 $HOME/.gem/credentials
printf -- "---\n:github: ${GEM_HOST_API_KEY}\n" > $HOME/.gem/credentials
gem push --KEY github --host https://rubygems.pkg.github.com/${OWNER} ./pkg/*.gem
env:
GEM_HOST_API_KEY: "Bearer ${{secrets.GITHUB_TOKEN}}"
OWNER: ${{ github.repository_owner }}