Skip to content

Commit

Permalink
Try to publish gem (#5)
Browse files Browse the repository at this point in the history
  • Loading branch information
markphelps authored Aug 31, 2020
1 parent 1068ed1 commit c038429
Show file tree
Hide file tree
Showing 3 changed files with 32 additions and 3 deletions.
29 changes: 29 additions & 0 deletions .github/workflows/gem-push.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
name: Build and Push Ruby Gem

on:
release:
types: [published]

jobs:
build:
name: Build + Push
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v2

- uses: actions/setup-ruby@v1
with:
ruby-version: 2.6.3

- name: Publish to GPR
run: |
mkdir -p $HOME/.gem
touch $HOME/.gem/credentials
chmod 0600 $HOME/.gem/credentials
printf -- "---\n:github: ${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: "Bearer ${{secrets.GITHUB_TOKEN}}"
OWNER: ${{ github.repository_owner }}
2 changes: 1 addition & 1 deletion .github/workflows/generate.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ jobs:

- uses: ruby/setup-ruby@v1
with:
ruby-version: 2.6
ruby-version: 2.6.3

- name: Install dependencies
run: gem install grpc-tools
Expand Down
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ The official GRPC Ruby client for [Flipt](https://github.com/markphelps/flipt).

```ruby
source "https://rubygems.pkg.github.com/markphelps" do
gem "flipt-grpc", "0.2.0"
gem "flipt-grpc", "0.3.0"
end
```

Expand All @@ -28,7 +28,7 @@ end

Or install it yourself as:

$ gem install flipt-grpc --version "0.2.0" --source "https://rubygems.pkg.github.com/markphelps"
$ gem install flipt-grpc --version "0.3.0" --source "https://rubygems.pkg.github.com/markphelps"

## Usage Example

Expand Down

0 comments on commit c038429

Please sign in to comment.