From cd136cb00745d5887417bc34178fb227f9c41289 Mon Sep 17 00:00:00 2001 From: Leo Conforti Date: Sun, 7 Apr 2024 00:33:30 +0000 Subject: [PATCH] update publishing workflow --- .github/workflows/publish.yml | 26 +++++++++++++++++++------- 1 file changed, 19 insertions(+), 7 deletions(-) diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index c0bb5acf..9d7dc464 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -19,21 +19,29 @@ jobs: - uses: actions/checkout@v4 with: submodules: 'true' - - uses: ./.github/actions/common-setup + - uses: actions/setup-go@v5 + - uses: actions/setup-node@v4 with: - cache-dependency-path: | - submodules/wireguard-go/go.sum + node-version: "18.x" - - run: pnpm check - - run: pnpm build - - run: pnpm test - - run: git status + - name: "Install pnpm" + uses: pnpm/action-setup@v3 + with: + version: 8 + run_install: false + + - name: "Install dependencies with pnpm" + shell: bash + run: pnpm install - uses: actions/setup-node@v4 with: node-version: "18.x" registry-url: "https://registry.npmjs.org/" + - run: pnpm check + - run: pnpm build + - run: pnpm test - run: pnpm publish --no-git-checks --access public --registry https://registry.npmjs.org/ env: NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} @@ -42,6 +50,10 @@ jobs: with: node-version: "18.x" registry-url: "https://npm.pkg.github.com/" + - run: pnpm check + - run: pnpm build + - run: pnpm test + - run: npm init -y --scope ${{ github.repository_owner }} - run: pnpm publish --no-git-checks --access public --registry https://npm.pkg.github.com/ env: NODE_AUTH_TOKEN: ${{ secrets.GITHUB_TOKEN }}