Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
34 changes: 34 additions & 0 deletions .github/workflows/gem-push.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
name: Ruby Gem

on:
workflow_dispatch:
push:
branches:
- 'main'
tags:
- '*'
pull_request:
branches:
- '*'
types: [ opened, synchronize ]

jobs:
build:
name: Build + Publish
runs-on: ubuntu-latest
permissions:
packages: write
contents: read
if: ${{ github.event_name == 'workflow_dispatch' || contains(github.ref, 'tags/v') }}
steps:
- uses: actions/checkout@v2
- name: Set up Ruby 2.7
uses: ruby/setup-ruby@v1
with:
ruby-version: 2.7
- name: push gem
uses: trocco-io/push-gem-to-gpr-action@v1
with:
language: java
gem-path: "./build/gems/*.gem"
github-token: "${{ secrets.GITHUB_TOKEN }}"
11 changes: 10 additions & 1 deletion build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ plugins {
id "checkstyle"
id "maven-publish"
id "org.embulk.embulk-plugins" version "0.4.1"
id "com.palantir.git-version" version "0.12.3"
}

repositories {
Expand All @@ -12,9 +13,17 @@ repositories {
}

group = "io.trocco"
version = "0.1.0"
description = "Bigquery output for embulk"

version = {
def vd = versionDetails()
if (vd.commitDistance == 0 && vd.lastTag ==~ /^v[0-9]+\.[0-9]+\.[0-9]+(\.[a-zA-Z0-9]+)?/) {
vd.lastTag.substring(1)
} else {
"0.0.0.${vd.gitHash}.pre"
}
}()

sourceCompatibility = 1.8
targetCompatibility = 1.8

Expand Down