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/
|
cp -a upload/* site/packages/
|
||||||
- name: Create the release
|
- name: Create the release
|
||||||
env:
|
env:
|
||||||
|
# In non-production environments, the assets will not have been signed
|
||||||
DO_PUBLISH: ${{ inputs.environment == 'production' }}
|
DO_PUBLISH: ${{ inputs.environment == 'production' }}
|
||||||
TAG_NAME: ${{ inputs.tag_name }}
|
TAG_NAME: ${{ inputs.tag_name }}
|
||||||
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||||
|
|
@ -313,9 +314,9 @@ jobs:
|
||||||
else
|
else
|
||||||
release_args+=( --discussion-category "General" )
|
release_args+=( --discussion-category "General" )
|
||||||
fi
|
fi
|
||||||
action="echo"
|
guard="echo"
|
||||||
[ "$DO_PUBLISH" = "false" ] || action="command"
|
[ "$DO_PUBLISH" = "false" ] || guard=""
|
||||||
script/label-assets dist/gh_* | xargs $action gh release create "${release_args[@]}" --
|
script/label-assets dist/gh_* | xargs $guard gh release create "${release_args[@]}" --
|
||||||
- name: Publish site
|
- name: Publish site
|
||||||
env:
|
env:
|
||||||
DO_PUBLISH: ${{ inputs.environment == 'production' && !contains(inputs.tag_name, '-') }}
|
DO_PUBLISH: ${{ inputs.environment == 'production' && !contains(inputs.tag_name, '-') }}
|
||||||
|
|
|
||||||
|
|
@ -16,5 +16,5 @@ for asset; do
|
||||||
*.deb ) label="${label} deb" ;;
|
*.deb ) label="${label} deb" ;;
|
||||||
*.rpm ) label="${label} RPM" ;;
|
*.rpm ) label="${label} RPM" ;;
|
||||||
esac
|
esac
|
||||||
printf "%s#%s\n" "$asset" "$label"
|
printf '"%s#%s"\n' "$asset" "$label"
|
||||||
done
|
done
|
||||||
Loading…
Add table
Add a link
Reference in a new issue