-
Notifications
You must be signed in to change notification settings - Fork 0
37 lines (35 loc) · 941 Bytes
/
Copy pathrelease.yml
File metadata and controls
37 lines (35 loc) · 941 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
name: Push gem
on:
push:
tags:
- "v*"
jobs:
push:
name: Build, verify and publish
runs-on: ubuntu-latest
timeout-minutes: 15
permissions:
contents: write
id-token: write
environment:
name: release
url: https://rubygems.org/gems/openai-compatible-errors
steps:
- uses: actions/checkout@v5
with:
persist-credentials: false
- name: Set up Ruby
uses: ruby/setup-ruby@v1
with:
ruby-version: "3.3"
bundler-cache: true
- name: Verify tag matches gem version
env:
RELEASE_TAG: ${{ github.ref_name }}
run: |
bundle exec ruby -Ilib -e '
expected = "v#{OpenAICompatibleErrors::VERSION}"
abort "release tag must be #{expected}" unless ENV.fetch("RELEASE_TAG") == expected
'
- run: bundle exec rake test
- uses: rubygems/release-gem@v1