Skip to content

Commit

Permalink
update
Browse files Browse the repository at this point in the history
  • Loading branch information
Nycolaide committed Jan 30, 2025
1 parent a4439fb commit ebcffaa
Showing 1 changed file with 8 additions and 11 deletions.
19 changes: 8 additions & 11 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ on:
env:
local_version: 0.0.0
npm_version: 0.0.0
change_version: false

jobs:
build:
Expand Down Expand Up @@ -34,20 +35,14 @@ jobs:
needs: build
permissions:
contents: write
# outputs:
# local_version: ${{ steps.get_version_local.outputs.local_version }}
# version_release: ${{ steps.get_version_release.outputs.version_release }}
# npm_version: ${{ steps.get_npm_version.outputs.npm_version }}

steps:
- uses: actions/checkout@v4

- name: Get version from package.json
id: get_version_local
run: |
LOCAL_VERSION=$(node -p "require('./package.json').version")
echo "Local version: $LOCAL_VERSION"
echo "local_version=$LOCAL_VERSION" >> $GITHUB_ENV
echo $(node -p "require('./package.json').version")
env:
local_version: $(node -p "require('./package.json').version")

Expand All @@ -66,22 +61,25 @@ jobs:
run: |
PACKAGE_NAME="mytril"
NPM_VERSION=$(npm show $PACKAGE_NAME version || echo "0.0.0")
echo "npm_version=$NPM_VERSION" >> $GITHUB_ENV
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_AUTH_TOKEN }}
npm_version: $(npm show $PACKAGE_NAME version || echo "0.0.0")
npm_version: $NPM_VERSION

- name: Compare Diff
if: env.local_version != env.npm_version
run: |
echo "${{ env.local_version }}"
echo "${{ env.npm_version }}"
env:
change_version: false

- name: Compare Egal
if: env.local_version == env.npm_version
run: |
echo "${{ env.local_version }}"
echo "${{ env.npm_version }}"
env:
change_version: true
# - name: New prerelease version
# id: get_version_release
# run: |
Expand All @@ -104,7 +102,6 @@ jobs:
# git commit -a -m "publish release - ${{ steps.get_version_release.outputs.version_release }}"
# git status
# git push

# publish:
# runs-on: ubuntu-latest
# needs: prepublish
Expand Down

0 comments on commit ebcffaa

Please sign in to comment.