Skip to content

S2-Release

S2-Release #1

Workflow file for this run

name: S2-Release
on:
workflow_dispatch:
jobs:
release:
runs-on: ubuntu-latest
steps:
- name: Require tag
if: ${{ !startsWith(github.ref, 'refs/tags/') }}
run: |
echo "::error::S2-Release must be run from a tag, not a branch."
exit 1
- uses: actions/checkout@v6
- uses: ruby/setup-ruby@v1
with:
ruby-version: "3.3"
bundler-cache: true
- name: Verify version matches tag
run: |
GEM_VERSION=$(ruby -r ./lib/jekyll-aeo/version -e "puts JekyllAeo::VERSION")
TAG_VERSION="${GITHUB_REF#refs/tags/}"
if [ "$GEM_VERSION" != "$TAG_VERSION" ]; then
echo "::error::Tag ($TAG_VERSION) does not match gem version ($GEM_VERSION)"
exit 1
fi
- run: bundle exec rake
- run: gem build jekyll-aeo.gemspec
- run: gem push jekyll-aeo-*.gem
env:
GEM_HOST_API_KEY: ${{ secrets.RUBYGEMS_API_KEY }}