fix: fix release flow - release is always done from pr to main branch with title *.*.*
This commit is contained in:
parent
d2fdc05d66
commit
cf1f7a3dca
1 changed files with 12 additions and 1 deletions
13
.github/workflows/release.yml
vendored
13
.github/workflows/release.yml
vendored
|
|
@ -107,18 +107,28 @@ jobs:
|
||||||
|
|
||||||
release:
|
release:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
if: ${{ github.event_name == 'pull_request' }}
|
if: ${{ github.event_name == 'pull_request' && github.event.pull_request.merged == true }}
|
||||||
needs: on-success
|
needs: on-success
|
||||||
steps:
|
steps:
|
||||||
|
- name: check pull_request title
|
||||||
|
uses: actions-ecosystem/action-regex-match@v2
|
||||||
|
id: regex-match
|
||||||
|
with:
|
||||||
|
text: ${{ github.event.pull_request.title }}
|
||||||
|
regex: "^(\\d+\\.\\d+\\.\\d+)$"
|
||||||
|
|
||||||
- name: checkout
|
- name: checkout
|
||||||
|
if: ${{ steps.regex-match.outputs.match != '' }}
|
||||||
uses: actions/checkout@v4
|
uses: actions/checkout@v4
|
||||||
|
|
||||||
- name: download artifacts
|
- name: download artifacts
|
||||||
|
if: ${{ steps.regex-match.outputs.match != ''}}
|
||||||
uses: actions/download-artifact@v3
|
uses: actions/download-artifact@v3
|
||||||
with:
|
with:
|
||||||
path: /tmp/rpxy
|
path: /tmp/rpxy
|
||||||
|
|
||||||
- name: make tar.gz of assets
|
- name: make tar.gz of assets
|
||||||
|
if: ${{ steps.regex-match.outputs.match != ''}}
|
||||||
run: |
|
run: |
|
||||||
mkdir /tmp/assets
|
mkdir /tmp/assets
|
||||||
cd /tmp/rpxy
|
cd /tmp/rpxy
|
||||||
|
|
@ -126,6 +136,7 @@ jobs:
|
||||||
ls -lha /tmp/assets
|
ls -lha /tmp/assets
|
||||||
|
|
||||||
- name: release
|
- name: release
|
||||||
|
if: ${{ steps.regex-match.outputs.match != ''}}
|
||||||
uses: softprops/action-gh-release@v1
|
uses: softprops/action-gh-release@v1
|
||||||
with:
|
with:
|
||||||
files: /tmp/assets/*.tar.gz
|
files: /tmp/assets/*.tar.gz
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue