Skip to content

Release v0.12.0 with apply=true #24

Release v0.12.0 with apply=true

Release v0.12.0 with apply=true #24

Workflow file for this run

name: Release
run-name: Release v${{ inputs.version }} with apply=${{ inputs.apply }}
on:
workflow_dispatch:
inputs:
version:
description: version. The next release version (without prefix v)
required: true
apply:
description: apply. Specify whether the actual release should be performed or not
type: boolean
jobs:
release:
runs-on: ubuntu-latest
permissions:
contents: write
id-token: write
steps:
- uses: actions/create-github-app-token@v1
id: app-token
with:
app-id: ${{ vars.APP_ID }}
private-key: ${{ secrets.PRIVATE_KEY }}
- uses: actions/checkout@v4
with:
token: ${{ steps.app-token.outputs.token }}
- uses: rubygems/configure-rubygems-credentials@v1.0.0
- uses: ruby/setup-ruby@v1
with:
ruby-version: '3'
bundler-cache: true
- name: Update `RailsBand::VERSION`
run: |
cat <<RUBY > lib/rails_band/version.rb
# frozen_string_literal: true
module RailsBand
VERSION = '${{ inputs.version }}'
end
RUBY
- run: git diff
- uses: yykamei/actions-git-push@main
with:
commit-message: Bump to ${{ inputs.version }}
if: inputs.apply
- run: gem build rails_band.gemspec
- run: gem push ./*.gem
if: inputs.apply
- uses: yykamei/actions-release-actions@main
with:
token: ${{ steps.app-token.outputs.token }}
tag: v${{ inputs.version }}
apply: ${{ inputs.apply }}
overwrite-major-minor: 'false'