diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml new file mode 100644 index 0000000..b36520b --- /dev/null +++ b/.github/workflows/release.yml @@ -0,0 +1,34 @@ +name: release + +on: + push: + branches: + - main + +jobs: + release-please: + runs-on: ubuntu-latest + steps: + - uses: google-github-actions/release-please-action@v4 + id: release + + - uses: actions/checkout@v4 + if: ${{ steps.release.outputs.release_created }} + + - uses: ruby/setup-ruby@v1 + if: ${{ steps.release.outputs.release_created }} + + - run: bundle install + if: ${{ steps.release.outputs.release_created }} + + - name: publish gem + 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.GEM_HOST_API_KEY}}" diff --git a/.release-please-manifest.json b/.release-please-manifest.json new file mode 100644 index 0000000..466df71 --- /dev/null +++ b/.release-please-manifest.json @@ -0,0 +1,3 @@ +{ + ".": "0.1.0" +} diff --git a/release-please-config.json b/release-please-config.json new file mode 100644 index 0000000..a4230c2 --- /dev/null +++ b/release-please-config.json @@ -0,0 +1,15 @@ +{ + "include-component-in-tag": false, + "version-file": "lib/rate_center/version.rb", + "packages": { + ".": { + "changelog-path": "CHANGELOG.md", + "release-type": "ruby", + "bump-minor-pre-major": true, + "bump-patch-for-minor-pre-major": false, + "draft": false, + "prerelease": false + } + }, + "$schema": "https://raw.githubusercontent.com/googleapis/release-please/main/schemas/config.json" +}