Skip to content

Commit

Permalink
chore: updated node version on pipeline
Browse files Browse the repository at this point in the history
  • Loading branch information
chrisarevalodev committed Sep 25, 2024
1 parent e563942 commit 6be542a
Showing 1 changed file with 6 additions and 7 deletions.
13 changes: 6 additions & 7 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@ name: Deploy library on NPM
on:
release:
types: [created]


jobs:
publish:
Expand All @@ -18,7 +17,7 @@ jobs:
uses: andstor/file-existence-action@v3
with:
files: "package.json, README.md"

- name: File exists
if: steps.check_files.outputs.files_exists != 'true'
# Only runs if all of the files exists
Expand All @@ -40,7 +39,7 @@ jobs:
if: github.ref != steps.get_package_info.outputs.PACKAGE_VERSION
# Fail if package version not properly setted
run: exit 1

- name: Check if package repository matches with repository
if: github.repositoryUrl != steps.get_package_info.outputs.PACKAGE_REPOSITORY
# Fail if package repository doesn't match with repository
Expand All @@ -49,23 +48,23 @@ jobs:
- name: Push package to npmjs.com
uses: actions/setup-node@v1
with:
node-version: 16
node-version: 20
registry-url: https://registry.npmjs.org/

- name: Install dependencies
run: npm install

- name: Pre upload validation
id: pack
run: |
run: |
npm pack --dry-run >> output 2>&1
echo PRE_UPLOAD_HASH=$(cat output| grep shasum | cut -f4 -d" ") >> $GITHUB_OUTPUT
- name: Upload package
run: npm publish --access public
env:
NODE_AUTH_TOKEN: ${{secrets.NPM_TOKEN}}

- name: Post upload validation
id: unpack
run: |
Expand Down

0 comments on commit 6be542a

Please sign in to comment.