From b45d82302e176d7df5eb5afea4dac7b2a4fd8091 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Daniel=20Jim=C3=A9nez=20Rivera?= Date: Tue, 18 Mar 2025 16:00:51 +0100 Subject: [PATCH] Add node-win as package --- .github/workflows/publish-npm.yml | 34 +++++++++++++++++++++++++ .github/workflows/publish.yml | 42 ------------------------------- package.json | 2 +- 3 files changed, 35 insertions(+), 43 deletions(-) create mode 100644 .github/workflows/publish-npm.yml delete mode 100644 .github/workflows/publish.yml diff --git a/.github/workflows/publish-npm.yml b/.github/workflows/publish-npm.yml new file mode 100644 index 00000000..807ee2d7 --- /dev/null +++ b/.github/workflows/publish-npm.yml @@ -0,0 +1,34 @@ +name: Publish package to npmjs + +on: + release: + types: [published] + +jobs: + build: + runs-on: ubuntu-latest + + permissions: + contents: read + id-token: write + packages: write + + steps: + - name: Checkout code + uses: actions/checkout@v4 + + - uses: actions/setup-node@v4 + with: + node-version: 18 + + - name: Install dependencies + run: yarn install + + - name: Create .npmrc file + run: | + touch .npmrc + echo "registry=https://registry.npmjs.org/" >> .npmrc + echo "//registry.npmjs.org/:_authToken=${{ secrets.NPM_TOKEN }}" >> .npmrc + + - name: Publish package + run: npm publish --scope=@internxt --access public diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml deleted file mode 100644 index b8f9ad64..00000000 --- a/.github/workflows/publish.yml +++ /dev/null @@ -1,42 +0,0 @@ -name: Publish package in github package registry -on: - release: - types: [created] - workflow_dispatch: - -jobs: - build-windows: - runs-on: windows-latest - permissions: - contents: read - packages: write - steps: - - uses: actions/checkout@v2 - - run: yarn build:gyp - - uses: actions/upload-artifact@v2 - with: - name: windows-binaries - path: build/Release - - publish: - needs: build-windows - runs-on: windows-latest - permissions: - contents: read - packages: write - steps: - - uses: actions/checkout@v2 - - uses: actions/download-artifact@v2 - with: - name: windows-binaries - path: build/Release - - uses: actions/setup-node@v2 - with: - node-version: "16.x" - registry-url: "https://npm.pkg.github.com" - - run: yarn - env: - NODE_AUTH_TOKEN: ${{ secrets.GITHUB_TOKEN }} - - run: yarn publish - env: - NODE_AUTH_TOKEN: ${{ secrets.GITHUB_TOKEN }} diff --git a/package.json b/package.json index 7ef35f1e..c7703700 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "virtual-drive", - "version": "1.0.1", + "version": "1.0.0", "description": "", "main": "dist/index.ts", "types": "dist/index.d.ts",