Skip to content

Commit 4fc1506

Browse files
authored
Merge pull request #5 from emqx/develop
Develop
2 parents 2bb09d2 + 47b5f57 commit 4fc1506

2 files changed

Lines changed: 33 additions & 11 deletions

File tree

.github/workflows/build_custom_packages.yaml

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -230,6 +230,7 @@ jobs:
230230
needs: validate-tag-format
231231

232232
strategy:
233+
fail-fast: false
233234
matrix:
234235
arch:
235236
- ubuntu-22.04
@@ -239,9 +240,7 @@ jobs:
239240
os:
240241
- ubuntu
241242
- centos
242-
# exclude:
243-
# - arch: linux/arm/v7
244-
# os: centos
243+
245244

246245
steps:
247246
- name: Generate GitHub App token
@@ -338,10 +337,8 @@ jobs:
338337

339338
release:
340339
runs-on: ubuntu-latest
341-
if: github.ref_type == 'tag'
342-
340+
if: github.ref_type == 'tag' && !cancelled() && (needs.validate-tag-format.result == 'success' && contains(join(needs.build.result, ','), 'success'))
343341
permissions: write-all
344-
345342
needs:
346343
- build
347344
- validate-tag-format

.github/workflows/build_packages.yaml

Lines changed: 30 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -216,7 +216,7 @@ jobs:
216216
- ubuntu-22.04
217217
- ubuntu-22.04-arm
218218
golang:
219-
- 1.23.3
219+
- 1.23.8
220220
os:
221221
- ubuntu
222222
- centos
@@ -336,18 +336,43 @@ jobs:
336336
pattern: packages-*
337337
merge-multiple: true
338338
path: _packages
339+
# 第一步:检查文件是否存在,将结果存入步骤输出
340+
- name: Check if release note file exists
341+
id: check_release_note
342+
run: |
343+
if [ -f "release_notes/${{ github.ref_name }}.md" ]; then
344+
echo "file_exists=true" >> $GITHUB_OUTPUT
345+
else
346+
echo "file_exists=false" >> $GITHUB_OUTPUT
347+
fi
339348
- uses: softprops/action-gh-release@v1
340-
if: github.ref_type == 'tag'
349+
if: steps.check_release_note.outputs.file_exists == 'true'
350+
with:
351+
## When you use the repository's GITHUB_TOKEN to perform tasks,
352+
## events triggered by the GITHUB_TOKEN, with the exception of workflow_dispatch and repository_dispatch,
353+
## will not create a new workflow run.
354+
## This prevents you from accidentally creating recursive workflow runs.
355+
## More info: https://docs.github.com/en/actions/using-workflows/triggering-a-workflow#triggering-a-workflow-from-a-workflow
356+
token: ${{ steps.app-token.outputs.token }}
357+
# prerelease: true
358+
#generate_release_notes: true
359+
name: NeuronEX ${{ github.ref_name }} Released
360+
body_path: release_notes/${{ github.ref_name }}.md
361+
files: |
362+
_packages/neuronex-*
363+
- uses: softprops/action-gh-release@v1
364+
if: steps.check_release_note.outputs.file_exists == 'false'
341365
with:
342366
## When you use the repository's GITHUB_TOKEN to perform tasks,
343367
## events triggered by the GITHUB_TOKEN, with the exception of workflow_dispatch and repository_dispatch,
344368
## will not create a new workflow run.
345369
## This prevents you from accidentally creating recursive workflow runs.
346370
## More info: https://docs.github.com/en/actions/using-workflows/triggering-a-workflow#triggering-a-workflow-from-a-workflow
347371
token: ${{ steps.app-token.outputs.token }}
348-
prerelease: true
349-
generate_release_notes: true
372+
# prerelease: true
373+
#generate_release_notes: true
350374
name: NeuronEX ${{ github.ref_name }} Released
375+
body: "NeuronEX ${{ github.ref_name }} Released"
351376
files: |
352377
_packages/neuronex-*
353378
- uses: aws-actions/configure-aws-credentials@v5.1.1
@@ -387,7 +412,7 @@ jobs:
387412
# Create multi-arch manifest
388413
create-manifest:
389414
runs-on: ubuntu-latest
390-
if: github.ref_type == 'tag'
415+
if: github.ref_type == 'tag' && always()
391416
needs:
392417
- build-docker-images
393418
- check-validate-tag-format

0 commit comments

Comments
 (0)