Skip to content

Commit 2ccbf15

Browse files
committed
ci: release-please workflow
1 parent 6b494f3 commit 2ccbf15

File tree

4 files changed

+78
-0
lines changed

4 files changed

+78
-0
lines changed
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
{
2+
"base": "0.26.0",
3+
"sdk": "0.26.0"
4+
}

.github/release-please-config.json

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
{
2+
"bootstrap-sha": "571cb1b71ac32484321041b64507edcd926fc4cb",
3+
"bump-minor-pre-major": true,
4+
"release-type": "ruby",
5+
"packages": {
6+
"base": {
7+
"package-name": "stellar-base",
8+
"version-file": "lib/stellar/base/version.rb"
9+
},
10+
"sdk": {
11+
"package-name": "stellar-sdk",
12+
"version-file": "lib/stellar/sdk/version.rb"
13+
}
14+
}
15+
}
Lines changed: 58 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,58 @@
1+
name: release-please
2+
3+
on:
4+
push:
5+
branches: [ main ]
6+
workflow_dispatch:
7+
8+
jobs:
9+
release-please:
10+
runs-on: ubuntu-latest
11+
steps:
12+
- id: release
13+
uses: google-github-actions/release-please-action@v2.28.0
14+
with:
15+
command: manifest
16+
config-file: ".github/release-please-config.json"
17+
manifest-file: ".github/.release-please-manifest.json"
18+
19+
# The following steps only run when release was created
20+
- name: Checkout code if release was created
21+
if: ${{ steps.release.outputs.release_created }}
22+
uses: actions/checkout@v2
23+
24+
- name: Setup Ruby
25+
if: ${{ steps.release.outputs.release_created }}
26+
uses: ruby/setup-ruby@v1
27+
with:
28+
ruby-version: 2.7
29+
bundler-cache: true
30+
31+
- name: Build gems
32+
if: ${{ steps.release.outputs.release_created }}
33+
run: gem build */*.gemspec
34+
35+
# - name: Publish to GPR
36+
# if: ${{ steps.release.outputs.release_created }}
37+
# run: |
38+
# mkdir -p $HOME/.gem
39+
# touch $HOME/.gem/credentials
40+
# chmod 0600 $HOME/.gem/credentials
41+
# printf -- "---\n:github: ${GEM_HOST_API_KEY}\n" > $HOME/.gem/credentials
42+
# gem build *.gemspec
43+
# gem push --KEY github --host https://rubygems.pkg.github.com/${OWNER} *.gem
44+
# env:
45+
# GEM_HOST_API_KEY: "Bearer ${{secrets.GITHUB_TOKEN}}"
46+
# OWNER: ${{ github.repository_owner }}
47+
#
48+
# - name: Publish to RubyGems
49+
# if: ${{ steps.release.outputs.release_created }}
50+
# run: |
51+
# mkdir -p $HOME/.gem
52+
# touch $HOME/.gem/credentials
53+
# chmod 0600 $HOME/.gem/credentials
54+
# printf -- "---\n:rubygems_api_key: ${GEM_HOST_API_KEY}\n" > $HOME/.gem/credentials
55+
# gem build *.gemspec
56+
# gem push *.gem
57+
# env:
58+
# GEM_HOST_API_KEY: "${{secrets.RUBYGEMS_AUTH_TOKEN}}"

sdk/CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
# Change Log
2+
23
All notable changes to this project will be documented in this file.
34

45
The format is based on [Keep a Changelog](http://keepachangelog.com/)

0 commit comments

Comments
 (0)