-
Notifications
You must be signed in to change notification settings - Fork 9
52 lines (47 loc) · 1.57 KB
/
release-please.yml
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
on:
push:
branches:
- main
name: Run Release Please
jobs:
release-please:
runs-on: ubuntu-latest
# Release-please creates a PR that tracks all changes
steps:
- uses: google-github-actions/release-please-action@v3
id: release
with:
release-type: ruby
package-name: openfeature-sdk
bump-minor-pre-major: true
bump-patch-for-minor-pre-major: true
version-file: "lib/open_feature/sdk/version.rb"
outputs:
release_created: ${{ steps.release.outputs.release_created }}
release_tag_name: ${{ steps.release.outputs.tag_name }}
gem-release:
needs: release-please
runs-on: ubuntu-latest
if: ${{ needs.release-please.outputs.release_created }}
steps:
# The logic below handles the npm publication:
- name: Checkout Repository
uses: actions/checkout@a5ac7e51b41094c92402da3b24376905380afc29 # v4
with:
ref: ${{ needs.release-please.outputs.release_tag_name }}
# Set up Ruby if a release can be created.
- uses: ruby/setup-ruby@v1
- run: bundle install
- name: Release Gem
run: |
gem install bundler
bundle config unset deployment
bundle install
mkdir -p $HOME/.gem
touch $HOME/.gem/credentials
chmod 0600 $HOME/.gem/credentials
printf -- "---\n:rubygems_api_key: ${RUBY_GEM_API_TOKEN}\n" > $HOME/.gem/credentials
gem build *.gemspec
gem push *.gem
env:
RUBY_GEM_API_TOKEN: "${{secrets.RUBY_GEM_API_TOKEN}}"