Skip to content

Commit

Permalink
chore(replease): add release-please
Browse files Browse the repository at this point in the history
  • Loading branch information
adamcooke committed May 2, 2023
1 parent 56a659b commit 22d2b5f
Show file tree
Hide file tree
Showing 3 changed files with 34 additions and 3 deletions.
20 changes: 17 additions & 3 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,20 @@
name: CI
on: push
jobs:
release-please:
runs-on: ubuntu-latest
if: github.ref == 'refs/heads/main'
outputs:
release_created: ${{ steps.release-please.outputs.release_created }}
tag_name: ${{ steps.release-please.outputs.tag_name }} # e.g. v1.0.0
version: ${{ steps.release-please.outputs.version }} # e.g. 1.0.0
all: ${{ toJSON(steps.release-please.outputs) }}
steps:
- uses: google-github-actions/release-please-action@v3
id: release-please
with:
command: manifest

lint:
runs-on: ubuntu-latest
steps:
Expand Down Expand Up @@ -71,8 +85,8 @@ jobs:
release:
runs-on: ubuntu-latest
needs: [lint, test]
if: github.event_name == 'push' && contains(github.ref, 'refs/tags/')
needs: [test, release-please]
if: needs.release-please.outputs.release_created
steps:
- uses: actions/checkout@master

Expand All @@ -82,7 +96,7 @@ jobs:
ruby-version: 3.1

- name: Export version from tag name
run: echo ${GITHUB_REF/refs\/tags\//} > VERSION
run: echo ${{ needs.release-please.outputs.version }} > VERSION

- name: Build Gem
run: gem build *.gemspec
Expand Down
3 changes: 3 additions & 0 deletions .release-please-manifest.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
".": "3.4.0"
}
14 changes: 14 additions & 0 deletions release-please-config.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
{
"bootstrap-sha": "23c79175d75dc85cf0b059d9b33d8da8928e0384",
"packages": {
".": {
"release-type": "ruby",
"changelog-path": "CHANGELOG.md",
"bump-minor-pre-major": true,
"bump-patch-for-minor-pre-major": true,
"draft": false,
"prerelease": false
}
},
"$schema": "https://raw.githubusercontent.com/googleapis/release-please/main/schemas/config.json"
}

0 comments on commit 22d2b5f

Please sign in to comment.