Skip to content

Commit 4acf4ef

Browse files
committed
ci: splitting ci.yml into ci.yml and release.yml
1 parent 20b6e1d commit 4acf4ef

File tree

2 files changed

+34
-31
lines changed

2 files changed

+34
-31
lines changed

.github/workflows/ci.yml

Lines changed: 0 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -2,13 +2,6 @@ name: CI
22

33
on:
44
pull_request:
5-
push:
6-
branches: [ "main" ]
7-
8-
permissions:
9-
contents: write
10-
pull-requests: write
11-
id-token: write
125

136
jobs:
147
lint:
@@ -59,27 +52,3 @@ jobs:
5952

6053
- name: Run tests
6154
run: bundle exec rake spec
62-
63-
release:
64-
runs-on: ubuntu-latest
65-
needs: [ lint, yard, test ]
66-
if: github.event_name == 'push' && github.ref == 'refs/heads/main'
67-
steps:
68-
- uses: googleapis/release-please-action@v4
69-
id: release
70-
with:
71-
# The token to use for authentication
72-
token: ${{ secrets.AUTO_RELEASE_TOKEN }}
73-
74-
- uses: actions/checkout@v4
75-
if: ${{ steps.release.outputs.release_created }}
76-
- name: Set up Ruby
77-
uses: ruby/setup-ruby@v1
78-
if: ${{ steps.release.outputs.release_created }}
79-
with:
80-
bundler-cache: true
81-
ruby-version: .ruby-version
82-
83-
# Release
84-
- uses: rubygems/release-gem@v1
85-
if: ${{ steps.release.outputs.release_created }}

.github/workflows/release.yml

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
name: Release
2+
3+
on:
4+
push:
5+
branches: [ "main" ]
6+
7+
permissions:
8+
contents: write
9+
id-token: write
10+
pull-requests: write
11+
12+
jobs:
13+
release:
14+
runs-on: ubuntu-latest
15+
steps:
16+
17+
## Here's the new step for release-please
18+
- uses: googleapis/release-please-action@v4
19+
id: release
20+
with:
21+
token: ${{ secrets.AUTO_RELEASE_TOKEN }}
22+
23+
- uses: actions/checkout@v4
24+
if: ${{ steps.release.outputs.release_created }}
25+
26+
- name: Set up Ruby
27+
uses: ruby/setup-ruby@v1
28+
if: ${{ steps.release.outputs.release_created }}
29+
with:
30+
bundler-cache: true
31+
ruby-version: .ruby-version
32+
33+
- uses: rubygems/release-gem@v1
34+
if: ${{ steps.release.outputs.release_created }}

0 commit comments

Comments
 (0)