-
Notifications
You must be signed in to change notification settings - Fork 1
41 lines (32 loc) · 1.12 KB
/
release_gem.yml
File metadata and controls
41 lines (32 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
name: Publish gem to rubygems.org
on:
workflow_dispatch:
jobs:
release:
if: github.repository == 'itamae-plugins/itamae-plugin-recipe-rust'
runs-on: ubuntu-latest
environment:
name: rubygems.org
url: https://rubygems.org/gems/itamae-plugin-recipe-rust
permissions:
contents: write
id-token: write
steps:
- name: Harden Runner
uses: step-security/harden-runner@95d9a5deda9de15063e7595e9719c11c38c90ae2 # v2.13.2
with:
egress-policy: audit
- uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1
- name: Set up Ruby
uses: ruby/setup-ruby@8aeb6ff8030dd539317f8e1769a044873b56ea71 # v1.268.0
with:
bundler-cache: true
ruby-version: ruby
- name: Publish to RubyGems
uses: rubygems/release-gem@1c162a739e8b4cb21a676e97b087e8268d8fc40b # v1.1.2
- 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 }}