Skip to content

Commit

Permalink
ci: release-please workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
nebolsin committed May 7, 2021
1 parent 6b494f3 commit 2d0f07b
Show file tree
Hide file tree
Showing 4 changed files with 78 additions and 0 deletions.
4 changes: 4 additions & 0 deletions .github/.release-please-manifest.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
{
"base": "0.26.0",
"sdk": "0.26.0"
}
15 changes: 15 additions & 0 deletions .github/release-please-config.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
{
"bootstrap-sha": "571cb1b71ac32484321041b64507edcd926fc4cb",
"bump-minor-pre-major": true,
"release-type": "ruby",
"packages": {
"base": {
"package-name": "stellar-base",
"version-file": "lib/stellar/base/version.rb"
},
"sdk": {
"package-name": "stellar-sdk",
"version-file": "lib/stellar/sdk/version.rb"
}
}
}
58 changes: 58 additions & 0 deletions .github/workflows/release-please.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,58 @@
name: release-please

on:
push:
branches: [ main ]
workflow_dispatch:

jobs:
release-please:
runs-on: ubuntu-latest
steps:
- id: release
uses: google-github-actions/[email protected]
with:
command: manifest
config-file: ".github/release-please-config.json",
manifest-file: ".github/.release-please-manifest.json"

# The following steps only run when release was created
- name: Checkout code if release was created
if: ${{ steps.release.outputs.release_created }}
uses: actions/checkout@v2

- name: Setup Ruby
if: ${{ steps.release.outputs.release_created }}
uses: ruby/setup-ruby@v1
with:
ruby-version: 2.7
bundler-cache: true

- name: Build gems
if: ${{ steps.release.outputs.release_created }}
run: gem build */*.gemspec

# - name: Publish to GPR
# if: ${{ steps.release.outputs.release_created }}
# run: |
# mkdir -p $HOME/.gem
# touch $HOME/.gem/credentials
# chmod 0600 $HOME/.gem/credentials
# printf -- "---\n:github: ${GEM_HOST_API_KEY}\n" > $HOME/.gem/credentials
# gem build *.gemspec
# gem push --KEY github --host https://rubygems.pkg.github.com/${OWNER} *.gem
# env:
# GEM_HOST_API_KEY: "Bearer ${{secrets.GITHUB_TOKEN}}"
# OWNER: ${{ github.repository_owner }}
#
# - name: Publish to RubyGems
# if: ${{ steps.release.outputs.release_created }}
# run: |
# mkdir -p $HOME/.gem
# touch $HOME/.gem/credentials
# chmod 0600 $HOME/.gem/credentials
# printf -- "---\n:rubygems_api_key: ${GEM_HOST_API_KEY}\n" > $HOME/.gem/credentials
# gem build *.gemspec
# gem push *.gem
# env:
# GEM_HOST_API_KEY: "${{secrets.RUBYGEMS_AUTH_TOKEN}}"
1 change: 1 addition & 0 deletions sdk/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
# Change Log

All notable changes to this project will be documented in this file.

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

0 comments on commit 2d0f07b

Please sign in to comment.