We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent d4130be commit 33f4948Copy full SHA for 33f4948
.github/workflows/release.yml
@@ -4,6 +4,7 @@ on:
4
push:
5
tags:
6
- "[0-9]+.[0-9]+.[0-9]+-[0-9]+"
7
+ pull_request:
8
9
permissions:
10
contents: write
@@ -12,9 +13,10 @@ jobs:
12
13
upload-assets:
14
runs-on: ubuntu-latest
15
steps:
16
+ - uses: actions/checkout@v4
17
- id: get-upstream-tag
18
run: |
- 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)
20
echo "::set-output name=tag::$tag"
21
- uses: actions/checkout@v4
22
with:
@@ -39,6 +41,7 @@ jobs:
39
41
40
42
riscv64-linux-gnu-strip out/rg
43
- name: Release
44
+ if: startsWith(github.ref, 'refs/tags/')
45
uses: softprops/action-gh-release@v2
46
47
files: out/rg
0 commit comments