Skip to content

Commit

Permalink
Update npm-release.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
gnpaone authored Oct 1, 2024
1 parent e304247 commit 154ff8d
Showing 1 changed file with 16 additions and 22 deletions.
38 changes: 16 additions & 22 deletions .github/workflows/npm-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -118,16 +118,10 @@ jobs:
working-directory: npm/rust-just
run: |
LATEST_VERSION=${{ steps.latesttag.outputs.tag }}
echo $LATEST_VERSION
sed -i "s/\"version\": \"[0-9]\+\.[0-9]\+\.[0-9]\+\"/\"version\": \"$LATEST_VERSION\"/; s/\"\(rust-just-[^\"]*\)\": \"[0-9]\+\.[0-9]\+\.[0-9]\+\"/\"\1\": \"$LATEST_VERSION\"/g" package.json
yarn install
env:
YARN_ENABLE_IMMUTABLE_INSTALLS: false
- name: Print package.json
shell: bash
working-directory: npm/rust-just
run: |
cat package.json
- name: Create PR
id: cpr
uses: peter-evans/create-pull-request@v7
Expand Down Expand Up @@ -156,19 +150,19 @@ jobs:
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
numbers: ${{ steps.cpr.outputs.pull-request-number }}
# - name: Publish the package
# shell: bash
# working-directory: npm/rust-just
# run: |
# yarn config set npmAuthToken ${NODE_AUTH_TOKEN}
# yarn config set npmPublishRegistry "https://registry.npmjs.org"
# yarn build
# cp ../../README.md .
# cp ../../CHANGELOG.md .
# if [ ${{ contains(github.ref, '-') }} = "true" ]; then
# yarn npm publish --tag rc
# else
# yarn npm publish
# fi
# env:
# NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
- name: Publish the package
shell: bash
working-directory: npm/rust-just
run: |
yarn config set npmAuthToken ${NODE_AUTH_TOKEN}
yarn config set npmPublishRegistry "https://registry.npmjs.org"
yarn build
cp ../../README.md .
cp ../../CHANGELOG.md .
if [ ${{ contains(github.ref, '-') }} = "true" ]; then
yarn npm publish --tag rc
else
yarn npm publish
fi
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}

0 comments on commit 154ff8d

Please sign in to comment.