Skip to content

Commit 33f4948

Browse files
committed
Run CI for PRs
1 parent d4130be commit 33f4948

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

.github/workflows/release.yml

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ on:
44
push:
55
tags:
66
- "[0-9]+.[0-9]+.[0-9]+-[0-9]+"
7+
pull_request:
78

89
permissions:
910
contents: write
@@ -12,9 +13,10 @@ jobs:
1213
upload-assets:
1314
runs-on: ubuntu-latest
1415
steps:
16+
- uses: actions/checkout@v4
1517
- id: get-upstream-tag
1618
run: |
17-
tag=$(echo ${{ github.ref_name }} | cut -d- -f1)
19+
tag=$(echo ${{ startsWith(github.ref, 'refs/tags/') && github.ref_name || '$(git describe --tags --abbrev=0)' }} | cut -d- -f1)
1820
echo "::set-output name=tag::$tag"
1921
- uses: actions/checkout@v4
2022
with:
@@ -39,6 +41,7 @@ jobs:
3941
run: |
4042
riscv64-linux-gnu-strip out/rg
4143
- name: Release
44+
if: startsWith(github.ref, 'refs/tags/')
4245
uses: softprops/action-gh-release@v2
4346
with:
4447
files: out/rg

0 commit comments

Comments
 (0)