Skip to content

Commit

Permalink
single quotes
Browse files Browse the repository at this point in the history
  • Loading branch information
rootedbox committed Jul 12, 2024
1 parent eeab2a2 commit a58e231
Showing 1 changed file with 10 additions and 10 deletions.
20 changes: 10 additions & 10 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,37 +18,37 @@ jobs:

- name: Get current npm version
id: current_version
run: echo "::set-output name=version::$(node -p \"require('./package.json').version\")"
run: echo "version=$(node -p 'require(\"./package.json\").version')" >> $GITHUB_ENV

- name: Get previous npm version
id: previous_version
run: |
PREV_VERSION=$(npm view ${{ github.repository }} version)
echo "::set-output name=version::${PREV_VERSION}"
echo "version=${PREV_VERSION}" >> $GITHUB_ENV
- name: Check version change
id: version_check
run: |
if [ "${{ steps.current_version.outputs.version }}" != "${{ steps.previous_version.outputs.version }}" ]; then
echo "::set-output name=changed::true"
if [ "${{ env.version }}" != "${{ env.version }}" ]; then
echo "changed=true" >> $GITHUB_ENV
else
echo "::set-output name=changed::false"
echo "changed=false" >> $GITHUB_ENV
fi
- name: Publish to npm
if: steps.version_check.outputs.changed == 'true'
if: env.changed == 'true'
uses: JS-DevTools/npm-publish@v3
with:
token: ${{ secrets.NPM_TOKEN }}

- name: Create GitHub Release
if: steps.version_check.outputs.changed == 'true'
if: env.changed == 'true'
uses: actions/create-release@v1
with:
tag_name: v${{ steps.current_version.outputs.version }}
release_name: Release v${{ steps.current_version.outputs.version }}
tag_name: v${{ env.version }}
release_name: Release v${{ env.version }}
body: |
New release v${{ steps.current_version.outputs.version }}
New release v${{ env.version }}
draft: false
prerelease: false
env:
Expand Down

0 comments on commit a58e231

Please sign in to comment.