File tree Expand file tree Collapse file tree 2 files changed +44
-1
lines changed Expand file tree Collapse file tree 2 files changed +44
-1
lines changed Original file line number Diff line number Diff line change 1+ name : Ruby Gem
2+
3+ on :
4+ workflow_dispatch :
5+ push :
6+ branches :
7+ - ' main'
8+ tags :
9+ - ' *'
10+ pull_request :
11+ branches :
12+ - ' *'
13+ types : [ opened, synchronize ]
14+
15+ jobs :
16+ build :
17+ name : Build + Publish
18+ runs-on : ubuntu-latest
19+ permissions :
20+ packages : write
21+ contents : read
22+ if : ${{ github.event_name == 'workflow_dispatch' || contains(github.ref, 'tags/v') }}
23+ steps :
24+ - uses : actions/checkout@v2
25+ - name : Set up Ruby 2.7
26+ uses : ruby/setup-ruby@v1
27+ with :
28+ ruby-version : 2.7
29+ - name : push gem
30+ uses : trocco-io/push-gem-to-gpr-action@v1
31+ with :
32+ language : java
33+ gem-path : " ./build/gems/*.gem"
34+ github-token : " ${{ secrets.GITHUB_TOKEN }}"
Original file line number Diff line number Diff line change @@ -4,6 +4,7 @@ plugins {
44 id " checkstyle"
55 id " maven-publish"
66 id " org.embulk.embulk-plugins" version " 0.4.1"
7+ id " com.palantir.git-version" version " 0.12.3"
78}
89
910repositories {
@@ -12,9 +13,17 @@ repositories {
1213}
1314
1415group = " io.trocco"
15- version = " 0.1.0"
1616description = " Bigquery output for embulk"
1717
18+ version = {
19+ def vd = versionDetails()
20+ if (vd. commitDistance == 0 && vd. lastTag ==~ / ^v[0-9]+\. [0-9]+\. [0-9]+(\. [a-zA-Z0-9]+)?/ ) {
21+ vd. lastTag. substring(1 )
22+ } else {
23+ " 0.0.0.${ vd.gitHash} .pre"
24+ }
25+ }()
26+
1827sourceCompatibility = 1.8
1928targetCompatibility = 1.8
2029
You can’t perform that action at this time.
0 commit comments