-
Notifications
You must be signed in to change notification settings - Fork 7
46 lines (36 loc) · 1.12 KB
/
push_gem.yml
File metadata and controls
46 lines (36 loc) · 1.12 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
name: Publish gem to rubygems.org
on:
push:
tags:
- 'v*'
permissions:
contents: read
jobs:
push:
if: github.repository == 'ruby/weakref'
runs-on: ubuntu-latest
environment:
name: rubygems.org
url: https://rubygems.org/gems/weakref
permissions:
contents: write
id-token: write
steps:
- name: Harden Runner
uses: step-security/harden-runner@fa2e9d605c4eeb9fcad4c99c224cee0c6c7f3594 # v2.16.0
with:
egress-policy: audit
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
- name: Set up Ruby
uses: ruby/setup-ruby@dffb23f65a78bba8db45d387d5ea1bbd6be3ef18 # v1.293.0
with:
bundler-cache: true
ruby-version: ruby
- name: Publish to RubyGems
uses: rubygems/release-gem@e9a6361a0b14562539327c2a02373edc56dd3169 # v1.1.4
- name: Create GitHub release
run: |
tag_name="$(git describe --tags --abbrev=0)"
gh release create "${tag_name}" --verify-tag --generate-notes
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}