.github/workflows/release.yml in stepmod-utils-0.3.4 vs .github/workflows/release.yml in stepmod-utils-0.3.5
- old
+ new
@@ -7,11 +7,11 @@
inputs:
next_version:
description: |
Next release version. Possible values: x.y.z, major, minor, patch or pre|rc|etc
required: true
- default: 'patch'
+ default: 'skip'
push:
tags: [ v* ]
jobs:
release:
@@ -20,24 +20,25 @@
- uses: actions/checkout@v2
- uses: ruby/setup-ruby@v1
with:
ruby-version: '2.6'
+ bundler-cache: true
- run: gem install gem-release
- - if: ${{ github.event_name == 'workflow_dispatch' }}
+ - if: ${{ github.event_name == 'workflow_dispatch' }} && ${{ github.event.inputs.next_version != 'skip' }}
run: |
git config user.name github-actions
git config user.email github-actions@github.com
gem bump --version ${{ github.event.inputs.next_version }} --tag --push
- name: publish to rubygems.org
env:
RUBYGEMS_API_KEY: ${{secrets.METANORMA_CI_RUBYGEMS_API_KEY}}
run: |
gem install gem-release
- cat > ~/.gem/credentials << EOF
+ envsubst << 'EOF' > ~/.gem/credentials
---
:rubygems_api_key: ${RUBYGEMS_API_KEY}
EOF
chmod 0600 ~/.gem/credentials
gem release