From 202c555acc56edb3dd8b50d4c78faa4b1906a002 Mon Sep 17 00:00:00 2001 From: Ashwin Maroli Date: Thu, 9 Dec 2021 21:54:27 +0530 Subject: [PATCH] Backport #8830 for v4.2.x: Add a workflow to build gems consistently (#8869) Add a workflow to build gems consistently This backports db3f034 to 4.2-stable --- .github/workflows/release.yml | 34 ++++++++++++++++++++++++++++++++++ History.markdown | 1 + 2 files changed, 35 insertions(+) create mode 100644 .github/workflows/release.yml diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml new file mode 100644 index 00000000000..d181e6d0a6d --- /dev/null +++ b/.github/workflows/release.yml @@ -0,0 +1,34 @@ +name: Release Gem + +on: + push: + branches: + - master + - "*-stable" + paths: + - "lib/**/version.rb" + +jobs: + release: + if: "github.repository_owner == 'jekyll'" + name: "Release Gem (Ruby ${{ matrix.ruby_version }})" + runs-on: "ubuntu-latest" + strategy: + fail-fast: true + matrix: + ruby_version: + - 2.7 + steps: + - name: Checkout Repository + uses: actions/checkout@v2 + - name: "Set up Ruby ${{ matrix.ruby_version }}" + uses: ruby/setup-ruby@v1 + with: + ruby-version: ${{ matrix.ruby_version }} + bundler-cache: true + - name: Build and Publish Gem + uses: ashmaroli/release-gem@dist + with: + gemspec_name: jekyll + env: + GEM_HOST_API_KEY: ${{ secrets.RUBYGEMS_GEM_PUSH_API_KEY }} diff --git a/History.markdown b/History.markdown index bba6742a609..5922d4863ca 100644 --- a/History.markdown +++ b/History.markdown @@ -6,6 +6,7 @@ ### Development Fixes + * Backport #8830 for v4.2.x: Add a workflow to build gems consistently (#8869) * Lock `rubocop-performance` to `v1.11.x`. ## 4.2.1 / 2021-09-27