Skip to content

Commit

Permalink
chore: set user-agent in release workflow (#50)
Browse files Browse the repository at this point in the history
  • Loading branch information
glooms authored May 14, 2024
1 parent a828d7f commit 14b3c6c
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion .github/workflows/release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,11 @@ jobs:
VERSION=$(git describe --tags --abbrev=7 --match "v*")
VERSION=${VERSION#v}
echo "version is $VERSION"
jq --arg version "$VERSION" '.version = $version' package.json >temp.json && mv temp.json package.json
jq --arg version "$VERSION" '.version = $version' package.json > temp.json && mv temp.json package.json
cat package.json
# Set the default user-agent.
ls ./chunks > /dev/null || echo "Missing chunks directory!" && exit 1
find ./chunks -type f -exec sed -i "s;defaultUserAgent = \"qlik-api/latest\";defaultUserAgent = \"qlik-api/$VERSION\";g" -- {} +
npm publish
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_CI_TOKEN }}

0 comments on commit 14b3c6c

Please sign in to comment.