-
-
Notifications
You must be signed in to change notification settings - Fork 45
47 lines (37 loc) · 1012 Bytes
/
release.yml
File metadata and controls
47 lines (37 loc) · 1012 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
38
39
40
41
42
43
44
45
46
47
on:
push:
branches:
- master
tags:
- 'v*.*.*'
jobs:
release:
runs-on: ubuntu-latest
if: startsWith(github.ref, 'refs/tags/') # Run only when tagged like v1.0.1
permissions:
contents: write
id-token: write
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Set up Ruby
uses: ruby/setup-ruby@v1
with:
ruby-version: 3.4
bundler-cache: true
- name: Build gem
id: build
run: bundle exec rake build
- name: Capture package name
id: package_name
run: |
echo "package_name=$(basename pkg/*.gem | tail -n1)" >> $GITHUB_ENV
- uses: actions/upload-artifact@v4
with:
name: ${{env.package_name}}
path: pkg/${{env.package_name}}
- uses: softprops/action-gh-release@v2
with:
files: pkg/${{env.package_name}}
generate_release_notes: true
- uses: rubygems/release-gem@v1