-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
ci to publish ouroborus gem on github packages
- Loading branch information
Showing
1 changed file
with
32 additions
and
0 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,32 @@ | ||
name: Publish Ouroborus Gem | ||
|
||
on: | ||
push: | ||
tags: | ||
- 'ouroborus*' | ||
|
||
jobs: | ||
publish-gem: | ||
runs-on: ubuntu-latest | ||
|
||
permissions: | ||
contents: read | ||
packages: write | ||
|
||
steps: | ||
- name: Checkout code | ||
uses: actions/checkout@v2 | ||
|
||
- name: Set up Ruby | ||
uses: ruby/setup-ruby@v1 | ||
with: | ||
ruby-version: 3.0 | ||
|
||
- name: Publish Ouroborus Gem to GitHub Registry | ||
run: | | ||
mkdir -p ~/.gem | ||
echo ":github: Bearer ${{ secrets.GITHUB_TOKEN }}" > ~/.gem/credentials | ||
chmod 0600 ~/.gem/credentials | ||
cd ouroborus | ||
gem build ouroborus.gemspec | ||
gem push --key github --host https://rubygems.pkg.github.com/${{ github.actor }} ouroborus-*.gem |