-
-
Notifications
You must be signed in to change notification settings - Fork 0
36 lines (35 loc) · 1.01 KB
/
release.yml
File metadata and controls
36 lines (35 loc) · 1.01 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
on:
push:
tags:
- 'v*'
name: Build & release gem
jobs:
release:
name: Build & release gem
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: ruby/setup-ruby@v1
with:
ruby-version: 2.7
bundler-cache: true
- run: bundle exec bin/release-check
- run: bundle exec bin/extract-changelog > release.md
- run: gem build lirc.gemspec
- uses: actions/create-release@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
tag_name: ${{ github.ref }}
release_name: Release ${{ github.ref }}
draft: false
prerelease: false
body_path: release.md
- name: Publish to RubyGems
run: |
mkdir -p "$HOME/.gem"
printf -- "---\n:rubygems_api_key: $RUBYGEMS_API_KEY\n" > "$HOME/.gem/credentials"
chmod 0600 "$HOME/.gem/credentials"
gem push *.gem
env:
RUBYGEMS_API_KEY: ${{secrets.RUBYGEMS_AUTH_TOKEN}}