diff --git a/.release-please-manifest.json b/.release-please-manifest.json new file mode 100644 index 0000000..0ee8c01 --- /dev/null +++ b/.release-please-manifest.json @@ -0,0 +1,3 @@ +{ + ".": "0.3.0" +} diff --git a/release-please-config.json b/release-please-config.json new file mode 100644 index 0000000..c9bcefc --- /dev/null +++ b/release-please-config.json @@ -0,0 +1,19 @@ +{ + "$schema": "https://raw.githubusercontent.com/googleapis/release-please/main/schemas/config.json", + "bump-minor-pre-major": true, + "bump-patch-for-minor-pre-major": false, + "draft": false, + "include-component-in-tag": true, + "include-v-in-tag": true, + "prerelease": false, + "skip-github-release": false, + "separate-pull-requests": true, + "tag-separator": "/", + "sequential-calls": true, + "packages": { + ".": { + "release-type": "ruby", + "package-name": "groq-ruby" + } + } +} diff --git a/release-please.yml b/release-please.yml new file mode 100644 index 0000000..b58097a --- /dev/null +++ b/release-please.yml @@ -0,0 +1,36 @@ +name: Release +on: + push: + branches: + - "develop" # develop only +jobs: + build: + runs-on: ubuntu-latest + permissions: write-all + steps: + - uses: googleapis/release-please-action@v4 + id: release + # Checkout code if release was created + - uses: actions/checkout@v4 + if: ${{ steps.release.outputs.release_created }} + # Setup ruby if a release was created + - uses: ruby/setup-ruby@v1 + + with: + # Not needed with a .ruby-version file + ruby-version: ruby + # runs 'bundle install' and caches installed gems automatically + bundler-cache: true + if: ${{ steps.release.outputs.release_created }} + + - 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}}"