-
-
Notifications
You must be signed in to change notification settings - Fork 1.2k
50 lines (45 loc) · 1.74 KB
/
Copy pathrelease.yml
File metadata and controls
50 lines (45 loc) · 1.74 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
name: Release Gem to rubygems.org
on:
push:
tags:
- v*
jobs:
push:
if: github.repository == 'refinery/refinerycms'
runs-on: ubuntu-latest
permissions:
contents: write
id-token: write
steps:
# Set up
- uses: actions/checkout@v6
- name: Set up Ruby
uses: ruby/setup-ruby@v1
with:
bundler-cache: true
ruby-version: ruby
# Release
#
# We use rubygems/configure-rubygems-credentials directly rather than the
# higher-level rubygems/release-gem action because this is a monorepo with
# multiple gems that must be released in dependency order. The release-gem
# action only supports a single gem (it runs `bundle exec rake release`
# which would only release the last gem registered with GemHelper).
#
# We also skip the `release:source_control_push` task (git tagging) because
# this workflow is triggered by a tag push — the tag already exists.
#
# rubygems/configure-rubygems-credentials exchanges the GitHub Actions OIDC
# token for a temporary RubyGems API key, enabling trusted publishing without
# storing any secrets.
- name: Configure RubyGems credentials
uses: rubygems/configure-rubygems-credentials@v2.0.0
# Gems are released in dependency order so each gem is available on
# RubyGems.org before any gem that depends on it is pushed.
- name: Release gems in dependency order
run: |
bundle exec rake testing:release:rubygem_push
bundle exec rake pages:release:rubygem_push
bundle exec rake images:release:rubygem_push
bundle exec rake resources:release:rubygem_push
bundle exec rake release:rubygem_push