Merge pull request #7424 from cli/deployment-release-guard
Fix release guard for deployment workflow
This commit is contained in:
commit
07d3a7e302
2 changed files with 5 additions and 4 deletions
7
.github/workflows/deployment.yml
vendored
7
.github/workflows/deployment.yml
vendored
|
|
@ -293,6 +293,7 @@ jobs:
|
|||
cp -a upload/* site/packages/
|
||||
- name: Create the release
|
||||
env:
|
||||
# In non-production environments, the assets will not have been signed
|
||||
DO_PUBLISH: ${{ inputs.environment == 'production' }}
|
||||
TAG_NAME: ${{ inputs.tag_name }}
|
||||
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
|
|
@ -313,9 +314,9 @@ jobs:
|
|||
else
|
||||
release_args+=( --discussion-category "General" )
|
||||
fi
|
||||
action="echo"
|
||||
[ "$DO_PUBLISH" = "false" ] || action="command"
|
||||
script/label-assets dist/gh_* | xargs $action gh release create "${release_args[@]}" --
|
||||
guard="echo"
|
||||
[ "$DO_PUBLISH" = "false" ] || guard=""
|
||||
script/label-assets dist/gh_* | xargs $guard gh release create "${release_args[@]}" --
|
||||
- name: Publish site
|
||||
env:
|
||||
DO_PUBLISH: ${{ inputs.environment == 'production' && !contains(inputs.tag_name, '-') }}
|
||||
|
|
|
|||
|
|
@ -16,5 +16,5 @@ for asset; do
|
|||
*.deb ) label="${label} deb" ;;
|
||||
*.rpm ) label="${label} RPM" ;;
|
||||
esac
|
||||
printf "%s#%s\n" "$asset" "$label"
|
||||
printf '"%s#%s"\n' "$asset" "$label"
|
||||
done
|
||||
Loading…
Add table
Add a link
Reference in a new issue