mirror of
https://github.com/ditkrg/rabbit_carrots.git
synced 2026-01-22 13:56:41 +00:00
Adds workflow
This commit is contained in:
parent
4e0005aa7e
commit
9b9cb750c4
2
.github/workflows/main.yml
vendored
2
.github/workflows/main.yml
vendored
@ -3,7 +3,7 @@ name: Ruby
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
- master
|
||||
- main
|
||||
|
||||
pull_request:
|
||||
|
||||
|
||||
50
.github/workflows/release.yml
vendored
Normal file
50
.github/workflows/release.yml
vendored
Normal file
@ -0,0 +1,50 @@
|
||||
# .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: GoogleCloudPlatform/release-please-action@v2
|
||||
id: release
|
||||
with:
|
||||
# The release type
|
||||
release-type: ruby
|
||||
# A name for the artifact releases are being created for
|
||||
# which is the name of our gem
|
||||
package-name: rabbit_carrots
|
||||
# Should breaking changes before 1.0.0 produce minor bumps?
|
||||
bump-minor-pre-major: true
|
||||
# Path to our version file to increment
|
||||
version-file: "lib/rabbit_carrots/version.rb"
|
||||
# Checkout code if release was created
|
||||
- uses: actions/checkout@v2
|
||||
if: ${{ steps.release.outputs.release_created }}
|
||||
# Setup ruby if a release was created
|
||||
- uses: ruby/setup-ruby@v1
|
||||
with:
|
||||
ruby-version: 3.1.2
|
||||
if: ${{ steps.release.outputs.release_created }}
|
||||
# Bundle install
|
||||
- run: bundle install
|
||||
if: ${{ steps.release.outputs.release_created }}
|
||||
|
||||
- name: publish gem
|
||||
run: |
|
||||
mkdir -p $HOME/.gem
|
||||
touch $HOME/.gem/credentials
|
||||
chmod 0600 $HOME/.gem/credentials
|
||||
printf -- "---\n:rubygems_api_key: ${GEM_HOST_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
|
||||
GEM_HOST_API_KEY: "${{secrets.RUBYGEMS_AUTH_TOKEN}}"
|
||||
if: ${{ steps.release.outputs.release_created }}
|
||||
@ -1,7 +1,7 @@
|
||||
PATH
|
||||
remote: .
|
||||
specs:
|
||||
rabbit_carrots (0.1.15)
|
||||
rabbit_carrots (0.1.16)
|
||||
bunny (>= 2.19.0)
|
||||
connection_pool (~> 2.3.0)
|
||||
|
||||
@ -15,7 +15,7 @@ GEM
|
||||
tzinfo (~> 2.0)
|
||||
amq-protocol (2.3.2)
|
||||
ast (2.4.2)
|
||||
bunny (2.19.0)
|
||||
bunny (2.20.3)
|
||||
amq-protocol (~> 2.3, >= 2.3.1)
|
||||
sorted_set (~> 1, >= 1.0.2)
|
||||
concurrent-ruby (1.1.10)
|
||||
@ -31,7 +31,7 @@ GEM
|
||||
rack (3.0.4.2)
|
||||
rainbow (3.1.1)
|
||||
rake (13.0.6)
|
||||
rbtree (0.4.5)
|
||||
rbtree (0.4.6)
|
||||
regexp_parser (2.6.1)
|
||||
rexml (3.2.5)
|
||||
rspec (3.12.0)
|
||||
|
||||
Loading…
Reference in New Issue
Block a user