Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ci: fix zizmor template-injection warning #373

Merged
merged 1 commit into from
Feb 10, 2025
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 5 additions & 8 deletions .github/workflows/release-plz.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,18 +32,15 @@ jobs:
if: ${{ steps.release-plz.outputs.prs_created }}
env:
GH_TOKEN: ${{ secrets.OXC_BOT_PAT }}
PR_NUMBER: ${{ fromJSON(steps.release-plz.outputs.pr).number }}
VERSION: ${{ fromJSON(steps.release-plz.outputs.pr).releases[0].version }}
run: |
set -e

pr_number=${{ fromJSON(steps.release-plz.outputs.pr).number }}
if [[ -n "$pr_number" ]]; then
version=${{ fromJSON(steps.release-plz.outputs.pr).releases[0].version }}
echo "version: $version"

jq --arg version "${version}" '.version = ($version)' npm/package.json > tmp
if [[ -n "$PR_NUMBER" ]]; then
jq --arg version "${VERSION}" '.version = ($VERSION)' npm/package.json > tmp
mv tmp npm/package.json

gh pr checkout $pr_number
gh pr checkout $PR_NUMBER
git add .
git commit --amend --no-edit
git push --force-with-lease
Expand Down