-
Notifications
You must be signed in to change notification settings - Fork 117
37 lines (34 loc) · 1004 Bytes
/
gem_push.yml
File metadata and controls
37 lines (34 loc) · 1004 Bytes
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
name: Push gem to RubyGems
on:
push:
tags:
- "v*"
permissions:
contents: read
jobs:
push:
if: github.repository == 'simplecov-ruby/simplecov-html'
runs-on: ubuntu-latest
environment:
name: rubygems.org
url: https://rubygems.org/gems/simplecov-html
permissions:
contents: write
id-token: write
steps:
- uses: actions/checkout@v6
- uses: ruby/setup-ruby@v1
with:
ruby-version: ruby
bundler-cache: true
- uses: rubygems/configure-rubygems-credentials@v1.0.0
- name: Update RubyGems
run: gem update --system
- name: Build gem
run: bundle exec rake build
- name: Sign gem with Sigstore
run: gem exec sigstore-cli sign pkg/*.gem --bundle pkg/simplecov-html.gem.sigstore.json
- name: Push gem
run: gem push pkg/*.gem --attestation pkg/simplecov-html.gem.sigstore.json
- name: Wait for release
run: gem exec rubygems-await pkg/*.gem