Skip to content

Commit 4c592eb

Browse files
committed
Separate workflows ci and push gem (also update actions)
1 parent 95b854e commit 4c592eb

File tree

2 files changed

+36
-25
lines changed

2 files changed

+36
-25
lines changed

.github/workflows/ci.yml

Lines changed: 9 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
name: main
1+
name: ci
22

33
on:
44
workflow_dispatch:
@@ -11,30 +11,14 @@ on:
1111
types: [opened, synchronize]
1212

1313
jobs:
14-
main:
14+
ci:
1515
runs-on: ubuntu-latest
16-
permissions:
17-
packages: write
18-
contents: read
1916
steps:
20-
- uses: actions/checkout@v1
21-
- name: Set up JDK 1.8
22-
uses: actions/setup-java@v1
17+
- uses: actions/checkout@v4
18+
- uses: actions/setup-java@v4
2319
with:
24-
java-version: 1.8
25-
- name: lint
26-
run: ./gradlew spotlessCheck
27-
- name: print version
28-
run: ./gradlew printVersion
29-
- name: Build Gem & Put it into './build/gems/' Directory
30-
run: ./gradlew gem
31-
- name: Set up JRuby
32-
uses: ruby/setup-ruby@v1
33-
with:
34-
ruby-version: jruby
35-
- name: push gem
36-
uses: trocco-io/push-gem-to-gpr-action@v1
37-
with:
38-
language: java
39-
gem-path: "./build/gems/*.gem"
40-
github-token: "${{ secrets.GITHUB_TOKEN }}"
20+
distribution: temurin
21+
java-version: 8
22+
- run: ./gradlew check
23+
- run: ./gradlew spotlessCheck
24+
- run: ./gradlew test

.github/workflows/push-gem.yml

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
name: Ruby Gem
2+
3+
on:
4+
workflow_dispatch:
5+
push:
6+
tags:
7+
- "*"
8+
9+
jobs:
10+
build:
11+
name: Build + Publish
12+
runs-on: ubuntu-latest
13+
permissions:
14+
packages: write
15+
contents: read
16+
steps:
17+
- uses: actions/checkout@v4
18+
- name: Set up Ruby 2.7
19+
uses: ruby/setup-ruby@v1
20+
with:
21+
ruby-version: 2.7
22+
- name: push gem
23+
uses: trocco-io/push-gem-to-gpr-action@v2
24+
with:
25+
language: java
26+
gem-path: "./build/gems/*.gem"
27+
github-token: "${{ secrets.GITHUB_TOKEN }}"

0 commit comments

Comments
 (0)