Skip to content

Commit

Permalink
Setup release-please
Browse files Browse the repository at this point in the history
  • Loading branch information
dwilkie committed Apr 19, 2024
1 parent e6d15a6 commit 60041c8
Show file tree
Hide file tree
Showing 4 changed files with 72 additions and 0 deletions.
17 changes: 17 additions & 0 deletions .github/workflows/dependabot-auto-merge.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
name: Dependabot auto-merge
on: pull_request

permissions:
contents: write
pull-requests: write

jobs:
dependabot:
runs-on: ubuntu-latest
if: ${{ github.actor == 'dependabot[bot]' }}
steps:
- name: Enable auto-merge for Dependabot PRs
run: gh pr merge --auto --merge "$PR_URL"
env:
PR_URL: ${{github.event.pull_request.html_url}}
GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}}
36 changes: 36 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
name: release

on:
push:
branches:
- master

jobs:
release-please:
runs-on: ubuntu-latest
steps:
- uses: google-github-actions/release-please-action@v4
id: release
with:
token: ${{ secrets.SOMLENG_PERSONAL_ACCESS_TOKEN }}

- 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}}"
3 changes: 3 additions & 0 deletions .release-please-manifest.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
".": "0.1.0"
}
16 changes: 16 additions & 0 deletions release-please-config.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
{
"bootstrap-sha": "f85974e958a5cff373dc6ba6b595e238bf8512d7",
"include-component-in-tag": false,
"version-file": "lib/cursor_paginator/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"
}

0 comments on commit 60041c8

Please sign in to comment.