mirror of
https://github.com/ditkrg/rabbit_carrots.git
synced 2026-01-22 22:06:40 +00:00
34 lines
850 B
YAML
34 lines
850 B
YAML
# .github/workflows/release.yml
|
|
|
|
name: Release
|
|
|
|
on:
|
|
push:
|
|
tags:
|
|
- v[0-9]+.[0-9]+.[0-9]+
|
|
|
|
jobs:
|
|
release-please:
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- uses: actions/checkout@v2
|
|
- uses: ruby/setup-ruby@v1
|
|
with:
|
|
ruby-version: 4.0.1
|
|
|
|
- name: publish gem
|
|
run: |
|
|
gem install bundler
|
|
bundle config unset deployment
|
|
bundle install
|
|
mkdir -p $HOME/.gem
|
|
touch $HOME/.gem/credentials
|
|
chmod 0600 $HOME/.gem/credentials
|
|
printf -- "---\n:rubygems_api_key: ${RUBYGEMS_API_KEY}\n" > $HOME/.gem/credentials
|
|
gem build *.gemspec
|
|
gem push *.gem
|
|
env:
|
|
# Make sure to update the secret name
|
|
# if yours isn't named RUBYGEMS_AUTH_TOKEN
|
|
RUBYGEMS_API_KEY: "${{secrets.RUBYGEMS_AUTH_TOKEN}}"
|