-
Notifications
You must be signed in to change notification settings - Fork 3
53 lines (43 loc) · 1.27 KB
/
release.yml
File metadata and controls
53 lines (43 loc) · 1.27 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
47
48
49
50
51
52
53
name: Release
on:
push:
branches:
- release
workflow_dispatch:
concurrency:
group: release-${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
permissions:
contents: write
jobs:
release:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v6
with:
fetch-depth: 0
ref: ${{ github.ref_name }}
- name: Set up Ruby
uses: ruby/setup-ruby@v1
with:
ruby-version: '4.0'
bundler-cache: false
- name: Install Bundler 2.x
run: gem install bundler -v "~> 2.0"
- name: Bundle install
run: bundle install
- name: Configure Git user
run: |
git config --global user.name "github-actions[bot]"
git config --global user.email "41898282+github-actions[bot]@users.noreply.github.com"
- name: Create RubyGems credentials
env:
RUBYGEMS_API_KEY: ${{ secrets.RUBYGEMS_API_KEY }}
run: |
mkdir -p ~/.gem
printf -- "---\n:rubygems_api_key: %s\n" "${RUBYGEMS_API_KEY}" > ~/.gem/credentials
chmod 0600 ~/.gem/credentials
- name: Release gem
run: |
git push --set-upstream origin "${GITHUB_REF_NAME}" || true
bundle exec rake release --trace