Skip to content

Commit d413651

Browse files
authored
chore: configure release please (#15)
Signed-off-by: Michael Beemer <[email protected]>
1 parent 9bcc2bc commit d413651

File tree

4 files changed

+82
-0
lines changed

4 files changed

+82
-0
lines changed
Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
name: "Lint PR"
2+
3+
on:
4+
pull_request_target:
5+
types:
6+
- opened
7+
- edited
8+
- synchronize
9+
10+
jobs:
11+
main:
12+
name: Validate PR title
13+
runs-on: ubuntu-latest
14+
steps:
15+
- uses: amannn/action-semantic-pull-request@v5
16+
env:
17+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
Lines changed: 47 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,47 @@
1+
on:
2+
push:
3+
branches:
4+
- main
5+
6+
name: Run Release Please
7+
jobs:
8+
release-please:
9+
runs-on: ubuntu-latest
10+
11+
# Release-please creates a PR that tracks all changes
12+
steps:
13+
- uses: google-github-actions/release-please-action@v3
14+
id: release
15+
with:
16+
command: manifest
17+
token: ${{secrets.GITHUB_TOKEN}}
18+
default-branch: main
19+
outputs:
20+
release_created: ${{ steps.release.outputs.release_created }}
21+
release_tag_name: ${{ steps.release.outputs.tag_name }}
22+
23+
gem-release:
24+
needs: Release-please
25+
runs-on: ubuntu-latest
26+
if: ${{ needs.release-please.outputs.release_created }}
27+
steps:
28+
# The logic below handles the npm publication:
29+
- name: Checkout Repository
30+
uses: actions/checkout@v3
31+
with:
32+
ref: ${{ needs.release-please.outputs.release_tag_name }}
33+
34+
# Set up Ruby if a release can be created.
35+
- uses: ruby/setup-ruby@v1
36+
with:
37+
bundler-cache: true
38+
39+
- name: Release Gem
40+
run: |
41+
bundle config unset deployment
42+
mkdir -p $HOME/.gem
43+
touch $HOME/.gem/credentials
44+
chmod 0600 $HOME/.gem/credentials
45+
printf -- "---\n:rubygems_api_key: ${RUBY_GEM_API_TOKEN}\n" > $HOME/.gem/credentials
46+
gem build *.gemspec
47+
gem push *.gem

.release-please-manifest.json

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
{
2+
".": "0.0.1"
3+
}

release-please-config.json

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
{
2+
"bootstrap-sha": "9bcc2bcbbcbce2d750ef1e0f67081fff4bb9ff79",
3+
"packages": {
4+
".": {
5+
"release-type": "ruby",
6+
"monorepo-tags": false,
7+
"include-component-in-tag": false,
8+
"prerelease": false,
9+
"bump-minor-pre-major": true,
10+
"bump-patch-for-minor-pre-major": true,
11+
"package-name": "openfeature-sdk",
12+
"version-file": "lib/openfeature/sdk/version.rb"
13+
}
14+
}
15+
}

0 commit comments

Comments
 (0)