Unverified Commit 1c5a6641 by Cuong Tran Committed by GitHub

Use Github acttions to publish to rubygem (#656)

parent 1288a82f
name: CI
on: [push]
on:
pull_request:
branches:
- '*'
push:
branches:
- '*'
jobs:
test:
runs-on: ubuntu-latest
......@@ -12,17 +20,17 @@ jobs:
steps:
- name: Checkout
uses: actions/checkout@v1
- name: Setup System
run: |
sudo apt-get install libsqlite3-dev
- name: Setup Ruby
uses: actions/setup-ruby@v1
with:
ruby-version: ${{ matrix.ruby }}
- name: Bundle
run: |
gem update --system
gem update bundler
bundle install --jobs 4 --retry 3
- name: Test
run: bundle exec rubocop && bundle exec rspec
name: Release
on:
push:
tags:
- 'release/v*'
jobs:
release:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v1
- name: Setup Ruby
uses: actions/setup-ruby@v1
with:
ruby-version: 2.6.x
- name: Bundle
run: |
gem update --system
gem update bundler
bundle install --jobs 4 --retry 3
- name: Publish to GPR
run: |
mkdir -p $HOME/.gem
touch $HOME/.gem/credentials
chmod 0600 $HOME/.gem/credentials
printf -- "---\n:github: Bearer ${GEM_HOST_API_KEY}\n" > $HOME/.gem/credentials
gem build *.gemspec
gem push --KEY github --host https://rubygems.pkg.github.com/${OWNER} *.gem
env:
GEM_HOST_API_KEY: ${{secrets.GPR_AUTH_TOKEN}}
OWNER: ctran
......@@ -163,7 +163,7 @@ you can do so with a simple environment variable, instead of editing the
== Options
Usage: annotate [options] [model_file]*
--additional-file-patterns Additional file paths or globs to annotate, separated by commas (e.g. `/foo/bar/%model_name%/*.rb,/baz/%model_name%.rb`)
--additional_file_patterns Additional file paths or globs to annotate, separated by commas (e.g. `/foo/bar/%model_name%/*.rb,/baz/%model_name%.rb`)
-d, --delete Remove annotations from all model files or the routes.rb file
-p [before|top|after|bottom], Place the annotations at the top (before) or the bottom (after) of the model/test/fixture/factory/route/serializer file(s)
--position
......@@ -216,18 +216,18 @@ you can do so with a simple environment variable, instead of editing the
--ignore-unknown-models don't display warnings for bad model files
--with-comment include database comments in model annotations
=== Option: +additional-file-patterns+
=== Option: +additional_file_patterns+
CLI: +--additional-file-patterns+<br>
Ruby: +:additional-file-patterns+
CLI: +--additional_file_patterns+<br>
Ruby: +:additional_file_patterns+
Provide additional paths for the gem to annotate. These paths can include globs.
It is recommended to use absolute paths. Here are some examples:
- <code>/app/lib/decorates/%MODEL_NAME%/*.rb</code>
- <code>/app/lib/forms/%PLURALIZED_MODEL_NAME%/**/*.rb</code>
- <code>/app/lib/forms/%TABLE_NAME%/*.rb</code>
- <code>/app/lib/decorates/%MODEL_NAME%/&ast;.rb</code>
- <code>/app/lib/forms/%PLURALIZED_MODEL_NAME%/&ast;&ast;/&ast;.rb</code>
- <code>/app/lib/forms/%TABLE_NAME%/&ast;.rb</code>
The appropriate model will be inferred using the <code>%*%</code> syntax, annotating any matching files.
It works with existing filename resolutions (options for which can be found in the +resolve_filename+ method of
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment