Skip to content

Commit cb80e8d

Browse files
authored
ci release: run as much as possible even when no tag push (#127)
It will find any problem before we release a new version.
1 parent 942ac04 commit cb80e8d

File tree

1 file changed

+8
-4
lines changed

1 file changed

+8
-4
lines changed

.github/workflows/release.yml

+8-4
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,23 @@
11
name: Release
22
on:
33
push:
4-
tags:
5-
- "*"
4+
pull_request:
65
jobs:
76
github:
87
name: GitHub
98
runs-on: ubuntu-latest
109
timeout-minutes: 10
1110
steps:
1211
- uses: actions/checkout@v4
13-
- name: Create a release
12+
- name: Extract release note
1413
run: |
1514
ruby \
1615
-e 'print("## stringio "); \
1716
puts(ARGF.read.split(/^## /)[1])' \
18-
NEWS.md > release-note.md
17+
NEWS.md | tee release-note.md
18+
- name: Create a release
19+
if: github.ref_type == 'tag'
20+
run: |
1921
title="$(head -n1 release-note.md | sed -e 's/^## //')"
2022
tail -n +2 release-note.md > release-note-without-version.md
2123
gh release create ${GITHUB_REF_NAME} \
@@ -47,6 +49,8 @@ jobs:
4749
run: |
4850
bundle exec rake compile
4951
- uses: rubygems/[email protected]
52+
if: github.ref_type == 'tag'
5053
- name: Push gems
54+
if: github.ref_type == 'tag'
5155
run: |
5256
bundle exec rake release:rubygem_push

0 commit comments

Comments
 (0)