Skip to content

Commit

Permalink
Fix: actions workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
NobleMajo committed Jan 18, 2025
1 parent 240059c commit fb71663
Show file tree
Hide file tree
Showing 3 changed files with 46 additions and 29 deletions.
25 changes: 13 additions & 12 deletions .github/workflows/auto-update.yml
Original file line number Diff line number Diff line change
Expand Up @@ -36,14 +36,8 @@ jobs:
add: 'package*.json'
message: 'Bot: npm deps update'

- name: Update npm dependencies
run: |
npm version patch --no-git-tag-version
npm update
npm run build
npm run test --if-present
- uses: actions/upload-artifact@v4
- name: Store build artifacts
uses: actions/upload-artifact@v4
with:
name: build-artifacts
path: |
Expand All @@ -54,15 +48,22 @@ jobs:
needs: update-deps
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v3
- name: Checkout repository
uses: actions/checkout@v4

- name: Set up Node.js
uses: actions/setup-node@v3
with:
node-version: 20
registry-url: https://registry.npmjs.org/
- uses: actions/download-artifact@v4

- name: Download build artifacts
uses: actions/download-artifact@v4
with:
name: build-artifacts
path: dist
- run: npm publish

- name: Publish to npm
run: npm publish
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
46 changes: 31 additions & 15 deletions .github/workflows/npm-publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,21 +12,30 @@ jobs:
build:
runs-on: ubuntu-latest

strategy:
matrix:
node-version: [20.x]

steps:
- uses: actions/checkout@v4
- name: Use Node.js ${{ matrix.node-version }}
- name: Checkout repository
uses: actions/checkout@v4

- name: Set up Node.js
uses: actions/setup-node@v3
with:
node-version: ${{ matrix.node-version }}
node-version: 20
cache: 'npm'
- run: npm ci
- run: npm run build
- run: npm run test --if-present
- uses: actions/upload-artifact@v4

- name: Update npm dependencies
run: |
npm ci
npm run build
npm run test --if-present
- name: Commit and push changes
uses: EndBug/add-and-commit@v9
with:
add: 'package*.json'
message: 'Bot: npm deps update'

- name: Store build artifacts
uses: actions/upload-artifact@v4
with:
name: build-artifacts
path: |
Expand All @@ -37,15 +46,22 @@ jobs:
needs: build
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v3
- name: Checkout repository
uses: actions/checkout@v4

- name: Set up Node.js
uses: actions/setup-node@v3
with:
node-version: 20
registry-url: https://registry.npmjs.org/
- uses: actions/download-artifact@v4

- name: Download build artifacts
uses: actions/download-artifact@v4
with:
name: build-artifacts
path: dist
- run: npm publish

- name: Publish to npm
run: npm publish
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "hivessh",
"version": "1.1.7",
"version": "1.1.10",
"description": "HiveSsh simplifies SSH2 connections via promise-based task execution on Linux servers with built-in server utilities and powerful command execution functions",
"main": "dist/index.js",
"type": "module",
Expand Down Expand Up @@ -63,4 +63,4 @@
"dependencies": {
"ssh2": "^1.15.0"
}
}
}

0 comments on commit fb71663

Please sign in to comment.