Skip to content

Commit

Permalink
feat: node20 update
Browse files Browse the repository at this point in the history
  • Loading branch information
saionaro committed May 11, 2024
1 parent be0a1c1 commit d0aef11
Show file tree
Hide file tree
Showing 6 changed files with 5,687 additions and 5,449 deletions.
20 changes: 6 additions & 14 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,9 @@ jobs:
runs-on: ubuntu-latest
if: github.ref == 'refs/heads/master'
steps:
- name: Checkout the repository
uses: actions/checkout@v3
- uses: actions/checkout@v4

- name: Cache node modules
uses: actions/cache@v3
- uses: actions/cache@v4
env:
cache-name: cache-node-modules
with:
Expand All @@ -22,18 +20,12 @@ jobs:
${{ runner.os }}-build-
${{ runner.os }}-
- name: Setup Node.JS
uses: actions/setup-node@v3
- uses: actions/setup-node@v4
with:
node-version: "18.x"
node-version: 20

- name: Install deps
run: npm ci
- run: npm ci

- name: Disable Lefthook
run: echo "LEFTHOOK=0" >> $GITHUB_ENV

- name: Release
run: npm run release
- run: npm run release
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
2 changes: 1 addition & 1 deletion LICENSE
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
MIT License

Copyright (c) 2020 Artem Shibakov
Copyright (c) 2024 Artem Shibakov

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
Expand Down
28 changes: 11 additions & 17 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,15 +24,12 @@ jobs:
name: Create Build
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@master

- name: Extract version
id: extract_version
uses: Saionaro/[email protected]
# From now you can access the version
- name: Print version
run: echo ${{ steps.extract_version.outputs.version }}
- uses: actions/checkout@v4

- uses: saionaro/[email protected]
id: package_ver
# from now you can access the version
- run: echo ${{ steps.package_ver.outputs.version }}
```
### Example workflow - get NPM version of subdirectory (useful in monorepos)
Expand All @@ -47,15 +44,12 @@ jobs:
name: Create Build
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@master
- uses: actions/checkout@v4

- name: Extract version
id: extract_version
uses: Saionaro/[email protected]
- uses: saionaro/[email protected]
id: package_ver
with:
path: mysubdir
# From now you can access the version
- name: Print version
run: echo ${{ steps.extract_version.outputs.version }}
# from now you can access the version
- run: echo ${{ steps.package_ver.outputs.version }}
```
4 changes: 2 additions & 2 deletions action.yml
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
name: Extract Package Version
description: Extract Package Version for npm packages.
author: "Saionaro"
author: "saionaro"
inputs:
path:
description: "The directory where package.json can be found (defaults to root of repo)"
runs:
using: "node16"
using: "node20"
main: "dist/index.js"
branding:
icon: alert-circle
Expand Down
Loading

0 comments on commit d0aef11

Please sign in to comment.