Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 14 additions & 0 deletions .github/workflows/publish-gem.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
name: Publish Gem Package
on:
push:
branches:
- main
paths:
- 'lib/textris/version.rb'
jobs:
gem_publish:
uses: holmanauto/ci-workflows/.github/workflows/gem-package-publish.yml@main
secrets: inherit
with:
gem-name: textris
npm-scope: ${{ vars.NPM_SCOPE }}
34 changes: 34 additions & 0 deletions .github/workflows/rc-publish-gem.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
name: Publish Release Candidate Gem Package

on:
# Trigger the workflow on any tag push
push:
tags:
- '*'

jobs:
extract_version:
runs-on: ubuntu-latest
outputs:
gem_version: ${{ steps.extract_version.outputs.gem_version }}
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Extract version from tag
id: extract_version
run: |
GEM_VERSION=$(grep '^[[:space:]]*textris (' Gemfile.lock | awk '{print $2}' | tr -d '()')
echo "gem_version=$GEM_VERSION" >> $GITHUB_OUTPUT
if [ "${{ github.ref_name }}" != $GEM_VERSION ]; then
echo "Your tag ${{ github.ref_name }} does not match the gem version $GEM_VERSION"
exit 1
fi
gem_publish:
needs: extract_version
if: endsWith(github.ref, '-rc')
uses: holmanauto/ci-workflows/.github/workflows/gem-package-publish.yml@main
secrets: inherit
with:
gem-name: textris
npm-scope: ${{ vars.NPM_SCOPE }}
asset-build-command: echo "No assets to build for this gem"
2 changes: 1 addition & 1 deletion lib/textris/version.rb
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
module Textris
VERSION = '0.7.0'
VERSION = '0.7.0.rc'
end