diff --git a/.github/workflows/auto-update.yml b/.github/workflows/auto-update.yml index 7374069..095d91a 100644 --- a/.github/workflows/auto-update.yml +++ b/.github/workflows/auto-update.yml @@ -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: | @@ -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 }} diff --git a/.github/workflows/npm-publish.yml b/.github/workflows/npm-publish.yml index c0db566..b32e964 100644 --- a/.github/workflows/npm-publish.yml +++ b/.github/workflows/npm-publish.yml @@ -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: | @@ -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 }} diff --git a/package.json b/package.json index 3d43ea1..8e38b00 100644 --- a/package.json +++ b/package.json @@ -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", @@ -63,4 +63,4 @@ "dependencies": { "ssh2": "^1.15.0" } -} +} \ No newline at end of file