forked from embulk/embulk-output-bigquery
-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
13 changed files
with
139 additions
and
46 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
name: Check | ||
on: [ pull_request, push ] | ||
jobs: | ||
check: | ||
runs-on: ubuntu-latest | ||
# push: always run. | ||
# pull_request: run only when the PR is submitted from a forked repository, not within this repository. | ||
if: github.event_name == 'push' || github.event.pull_request.head.repo.full_name != github.repository | ||
strategy: | ||
matrix: | ||
jruby_version: | ||
- 9.3.15.0 | ||
- 9.4.8.0 | ||
fail-fast: false | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- name: Set up OpenJDK 8 | ||
uses: actions/setup-java@v4 | ||
with: | ||
java-version: 8 | ||
distribution: "temurin" | ||
- name: download jruby | ||
run: "curl -L -o jruby.jar https://repo1.maven.org/maven2/org/jruby/jruby-complete/${{ matrix.jruby_version }}/jruby-complete-${{ matrix.jruby_version }}.jar" | ||
# | ||
# For avoiding permission denied. install gems into `gems` directory | ||
# | ||
- name: bundle install | ||
run: "env GEM_HOME=gems java -jar jruby.jar -S bundle install" | ||
|
||
- name: install embulk.jar | ||
run: "curl -L -o embulk.jar https://github.com/embulk/embulk/releases/download/v0.11.4/embulk-0.11.4.jar" | ||
- name: rake test | ||
run: 'env GEM_HOME=gems RUBYOPT="-r ./embulk.jar -r rubygems" java -jar jruby.jar -S bundle exec rake test' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
name: Publish | ||
on: | ||
push: | ||
tags: | ||
- "v0.*" | ||
jobs: | ||
publish: | ||
runs-on: ubuntu-latest | ||
environment: maven-central-and-ruby-gems | ||
strategy: | ||
fail-fast: true | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- name: Set up Ruby | ||
uses: ruby/setup-ruby@v1 | ||
with: | ||
ruby-version: 3.3.0 | ||
# get tag variable using {{ github.ref_name }} | ||
# | ||
# References: | ||
# * https://docs.github.com/en/actions/learn-github-actions/contexts#github-context | ||
# * https://docs.github.com/en/actions/learn-github-actions/variables#default-environment-variables | ||
- name: extract gem version from tag | ||
id: vars | ||
run: echo version=${{ github.ref_name }} | sed -e 's/v0/0/' >> $GITHUB_OUTPUT | ||
# | ||
# From gem push documents. | ||
# | ||
# The push command will use ~/.gem/credentials to authenticate to a server, | ||
# but you can use the RubyGems environment variable GEM_HOST_API_KEY | ||
# to set the api key to authenticate. | ||
# | ||
# https://guides.rubygems.org/command-reference/#gem-push | ||
# | ||
- name: Publish | ||
run: | | ||
rake build | ||
gem push pkg/${EMBULK_PLUGIN_NAME}-${{ steps.vars.outputs.version }}.gem | ||
env: | ||
EMBULK_PLUGIN_NAME: embulk-output-bigquery | ||
GEM_HOST_API_KEY: "${{secrets.RUBYGEMS_API_KEY}}" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.