Skip to content

Commit 09ef4d6

Browse files
committed
update workflow due to deprecated command 'set-output';
1 parent 6020404 commit 09ef4d6

1 file changed

Lines changed: 5 additions & 7 deletions

File tree

.github/workflows/npm-build-publish.yml

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -40,17 +40,15 @@ jobs:
4040
registry-url: 'https://registry.npmjs.org'
4141

4242
- name: Extract version from package.json
43-
id: package_version
44-
run: echo "::set-output name=VERSION::$(node -p "require('./package.json').version")"
43+
run: echo "VERSION=$(node -p "require('./package.json').version")" >> $GITHUB_ENV
4544

4645
- name: Check if version already published
4746
run: |
48-
VERSION=${{ steps.package_version.outputs.VERSION }}
49-
echo "Checking version: $VERSION"
50-
NPM_VIEW_OUTPUT=$(npm view epsillajs@$VERSION)
47+
echo "Checking version: ${{ env.VERSION }}"
48+
NPM_VIEW_OUTPUT=$(npm view epsillajs@${{ env.VERSION }})
5149
echo "npm view output: $NPM_VIEW_OUTPUT"
5250
if [ -n "$NPM_VIEW_OUTPUT" ]; then
53-
echo "Version $VERSION already exists on npm. Please update the version."
51+
echo "Version ${{ env.VERSION }} already exists on npm. Please update the version."
5452
exit 1
5553
fi
5654
@@ -59,7 +57,7 @@ jobs:
5957
with:
6058
github_token: ${{ secrets.PAT_TOKEN }}
6159
tag_prefix: "v"
62-
custom_tag: ${{ steps.package_version.outputs.VERSION }}
60+
custom_tag: ${{ env.VERSION }}
6361
dry_run: false
6462

6563
- name: Publish to npm

0 commit comments

Comments
 (0)