From 23a912bb84d7c6088301e1ffc59adfa8a799beab Mon Sep 17 00:00:00 2001 From: Lucas Fernandes Nogueira Date: Sat, 17 Aug 2024 08:21:27 -0300 Subject: [PATCH] fix(ci): @tauri-apps/cli publish workflow (#10659) * fix(ci): pnpm install * fix setup-node * node16 setup fails somehow * remove unnecessary install deps step * run nodejs directly * fix permissions * fix metadata --- .github/workflows/publish-cli-js.yml | 30 +++++++------------ .../cli/node/npm/darwin-arm64/package.json | 13 +++++++- tooling/cli/node/npm/darwin-x64/package.json | 13 +++++++- .../node/npm/linux-arm-gnueabihf/package.json | 13 +++++++- .../cli/node/npm/linux-arm64-gnu/package.json | 13 +++++++- .../node/npm/linux-arm64-musl/package.json | 13 +++++++- .../cli/node/npm/linux-x64-gnu/package.json | 13 +++++++- .../cli/node/npm/linux-x64-musl/package.json | 13 +++++++- .../node/npm/win32-arm64-msvc/package.json | 13 +++++++- .../cli/node/npm/win32-ia32-msvc/package.json | 13 +++++++- .../cli/node/npm/win32-x64-msvc/package.json | 13 +++++++- tooling/cli/node/package.json | 2 +- 12 files changed, 132 insertions(+), 30 deletions(-) diff --git a/.github/workflows/publish-cli-js.yml b/.github/workflows/publish-cli-js.yml index 59a2b34b5..166dc1e51 100644 --- a/.github/workflows/publish-cli-js.yml +++ b/.github/workflows/publish-cli-js.yml @@ -97,8 +97,7 @@ jobs: uses: actions/setup-node@v4 if: ${{ !matrix.settings.docker }} with: - node-version: 16 - check-latest: true + node-version: 18 cache: 'pnpm' architecture: ${{ matrix.settings.architecture }} - name: Install Rust @@ -116,7 +115,7 @@ jobs: if: ${{ matrix.settings.setup }} shell: bash - name: Install dependencies - run: pnpm i --frozen-lockfile --ignore-scripts --registry https://registry.npmjs.org --network-timeout 300000 + run: pnpm i --frozen-lockfile --ignore-scripts - name: Build in docker uses: addnab/docker-run-action@v3 @@ -175,7 +174,7 @@ jobs: # env # freebsd-version # cd ./tooling/cli/node/ - # pnpm i --frozen-lockfile --ignore-scripts --registry https://registry.npmjs.org --network-timeout 300000 + # pnpm i --frozen-lockfile --ignore-scripts # pnpm build:release # strip -x *.node # rm -rf node_modules @@ -199,7 +198,6 @@ jobs: - host: windows-latest target: x86_64-pc-windows-msvc node: - - '16' - '18' - '20' runs-on: ${{ matrix.settings.host }} @@ -210,10 +208,9 @@ jobs: uses: actions/setup-node@v4 with: node-version: ${{ matrix.node }} - check-latest: true cache: 'pnpm' - name: Install dependencies - run: pnpm i --frozen-lockfile --ignore-scripts --registry https://registry.npmjs.org --network-timeout 300000 + run: pnpm i --frozen-lockfile --ignore-scripts - name: Download artifacts uses: actions/download-artifact@v3 with: @@ -232,7 +229,6 @@ jobs: fail-fast: false matrix: node: - - '16' - '18' - '20' runs-on: ubuntu-latest @@ -243,10 +239,9 @@ jobs: uses: actions/setup-node@v4 with: node-version: ${{ matrix.node }} - check-latest: true cache: 'pnpm' - name: Install dependencies - run: pnpm i --frozen-lockfile --ignore-scripts --registry https://registry.npmjs.org --network-timeout 300000 + run: pnpm i --frozen-lockfile --ignore-scripts - name: Download artifacts uses: actions/download-artifact@v3 with: @@ -269,7 +264,6 @@ jobs: fail-fast: false matrix: node: - - '16' - '18' - '20' runs-on: ubuntu-latest @@ -282,10 +276,9 @@ jobs: uses: actions/setup-node@v4 with: node-version: ${{ matrix.node }} - check-latest: true cache: 'pnpm' - name: Install dependencies - run: pnpm i --frozen-lockfile --ignore-scripts --registry https://registry.npmjs.org --network-timeout 300000 + run: pnpm i --frozen-lockfile --ignore-scripts - name: Download artifacts uses: actions/download-artifact@v3 with: @@ -312,7 +305,6 @@ jobs: fail-fast: false matrix: node: - - '16' - '18' - '20' image: @@ -326,8 +318,6 @@ jobs: - name: List packages run: ls -R . shell: bash - - name: Install dependencies - run: pnpm i --frozen-lockfile --ignore-scripts --frozen-lockfile --registry https://registry.npmjs.org --network-timeout 300000 - name: Download aarch64-gnu artifacts uses: actions/download-artifact@v3 with: @@ -356,7 +346,7 @@ jobs: fnm install ${{ matrix.node }} fnm use ${{ matrix.node }} cd tooling/cli/node - pnpm tauri --help + node tauri.js --help ls -la publish: name: Publish @@ -367,6 +357,9 @@ jobs: - test-linux-x64-gnu-binding - test-linux-x64-musl-binding #- test-linux-arm-bindings + permissions: + contents: write # update release + id-token: write # npm provenance steps: - uses: actions/checkout@v4 - run: corepack enable @@ -374,10 +367,9 @@ jobs: uses: actions/setup-node@v4 with: node-version: 20 - check-latest: true cache: 'pnpm' - name: Install dependencies - run: pnpm i --frozen-lockfile --ignore-scripts --registry https://registry.npmjs.org --network-timeout 300000 + run: pnpm i --frozen-lockfile --ignore-scripts - name: Download all artifacts uses: actions/download-artifact@v3 with: diff --git a/tooling/cli/node/npm/darwin-arm64/package.json b/tooling/cli/node/npm/darwin-arm64/package.json index bd0eb651f..9297f731a 100644 --- a/tooling/cli/node/npm/darwin-arm64/package.json +++ b/tooling/cli/node/npm/darwin-arm64/package.json @@ -1,6 +1,18 @@ { "name": "@tauri-apps/cli-darwin-arm64", "version": "0.0.0", + "repository": { + "type": "git", + "url": "git+https://github.com/tauri-apps/tauri.git" + }, + "homepage": "https://github.com/tauri-apps/tauri#readme", + "bugs": { + "url": "https://github.com/tauri-apps/tauri/issues" + }, + "contributors": [ + "Tauri Programme within The Commons Conservancy" + ], + "license": "Apache-2.0 OR MIT", "publishConfig": { "access": "public" }, @@ -14,7 +26,6 @@ "files": [ "cli.darwin-arm64.node" ], - "license": "MIT", "engines": { "node": ">= 10" } diff --git a/tooling/cli/node/npm/darwin-x64/package.json b/tooling/cli/node/npm/darwin-x64/package.json index 1e38685a4..fa9072a4c 100644 --- a/tooling/cli/node/npm/darwin-x64/package.json +++ b/tooling/cli/node/npm/darwin-x64/package.json @@ -1,6 +1,18 @@ { "name": "@tauri-apps/cli-darwin-x64", "version": "0.0.0", + "repository": { + "type": "git", + "url": "git+https://github.com/tauri-apps/tauri.git" + }, + "homepage": "https://github.com/tauri-apps/tauri#readme", + "bugs": { + "url": "https://github.com/tauri-apps/tauri/issues" + }, + "contributors": [ + "Tauri Programme within The Commons Conservancy" + ], + "license": "Apache-2.0 OR MIT", "publishConfig": { "access": "public" }, @@ -14,7 +26,6 @@ "files": [ "cli.darwin-x64.node" ], - "license": "MIT", "engines": { "node": ">= 10" } diff --git a/tooling/cli/node/npm/linux-arm-gnueabihf/package.json b/tooling/cli/node/npm/linux-arm-gnueabihf/package.json index 0e3482552..c1ad0efa7 100644 --- a/tooling/cli/node/npm/linux-arm-gnueabihf/package.json +++ b/tooling/cli/node/npm/linux-arm-gnueabihf/package.json @@ -1,6 +1,18 @@ { "name": "@tauri-apps/cli-linux-arm-gnueabihf", "version": "0.0.0", + "repository": { + "type": "git", + "url": "git+https://github.com/tauri-apps/tauri.git" + }, + "homepage": "https://github.com/tauri-apps/tauri#readme", + "bugs": { + "url": "https://github.com/tauri-apps/tauri/issues" + }, + "contributors": [ + "Tauri Programme within The Commons Conservancy" + ], + "license": "Apache-2.0 OR MIT", "publishConfig": { "access": "public" }, @@ -14,7 +26,6 @@ "files": [ "cli.linux-arm-gnueabihf.node" ], - "license": "MIT", "engines": { "node": ">= 10" } diff --git a/tooling/cli/node/npm/linux-arm64-gnu/package.json b/tooling/cli/node/npm/linux-arm64-gnu/package.json index 4afe2ffa1..559dac434 100644 --- a/tooling/cli/node/npm/linux-arm64-gnu/package.json +++ b/tooling/cli/node/npm/linux-arm64-gnu/package.json @@ -1,6 +1,18 @@ { "name": "@tauri-apps/cli-linux-arm64-gnu", "version": "0.0.0", + "repository": { + "type": "git", + "url": "git+https://github.com/tauri-apps/tauri.git" + }, + "homepage": "https://github.com/tauri-apps/tauri#readme", + "bugs": { + "url": "https://github.com/tauri-apps/tauri/issues" + }, + "contributors": [ + "Tauri Programme within The Commons Conservancy" + ], + "license": "Apache-2.0 OR MIT", "publishConfig": { "access": "public" }, @@ -17,7 +29,6 @@ "files": [ "cli.linux-arm64-gnu.node" ], - "license": "MIT", "engines": { "node": ">= 10" } diff --git a/tooling/cli/node/npm/linux-arm64-musl/package.json b/tooling/cli/node/npm/linux-arm64-musl/package.json index 204e9a563..a2e2b84cf 100644 --- a/tooling/cli/node/npm/linux-arm64-musl/package.json +++ b/tooling/cli/node/npm/linux-arm64-musl/package.json @@ -1,6 +1,18 @@ { "name": "@tauri-apps/cli-linux-arm64-musl", "version": "0.0.0", + "repository": { + "type": "git", + "url": "git+https://github.com/tauri-apps/tauri.git" + }, + "homepage": "https://github.com/tauri-apps/tauri#readme", + "bugs": { + "url": "https://github.com/tauri-apps/tauri/issues" + }, + "contributors": [ + "Tauri Programme within The Commons Conservancy" + ], + "license": "Apache-2.0 OR MIT", "publishConfig": { "access": "public" }, @@ -17,7 +29,6 @@ "files": [ "cli.linux-arm64-musl.node" ], - "license": "MIT", "engines": { "node": ">= 10" } diff --git a/tooling/cli/node/npm/linux-x64-gnu/package.json b/tooling/cli/node/npm/linux-x64-gnu/package.json index e5c9e19bc..ab41c91bc 100644 --- a/tooling/cli/node/npm/linux-x64-gnu/package.json +++ b/tooling/cli/node/npm/linux-x64-gnu/package.json @@ -1,6 +1,18 @@ { "name": "@tauri-apps/cli-linux-x64-gnu", "version": "0.0.0", + "repository": { + "type": "git", + "url": "git+https://github.com/tauri-apps/tauri.git" + }, + "homepage": "https://github.com/tauri-apps/tauri#readme", + "bugs": { + "url": "https://github.com/tauri-apps/tauri/issues" + }, + "contributors": [ + "Tauri Programme within The Commons Conservancy" + ], + "license": "Apache-2.0 OR MIT", "publishConfig": { "access": "public" }, @@ -17,7 +29,6 @@ "files": [ "cli.linux-x64-gnu.node" ], - "license": "MIT", "engines": { "node": ">= 10" } diff --git a/tooling/cli/node/npm/linux-x64-musl/package.json b/tooling/cli/node/npm/linux-x64-musl/package.json index 44e9fbab5..82deedabd 100644 --- a/tooling/cli/node/npm/linux-x64-musl/package.json +++ b/tooling/cli/node/npm/linux-x64-musl/package.json @@ -1,6 +1,18 @@ { "name": "@tauri-apps/cli-linux-x64-musl", "version": "0.0.0", + "repository": { + "type": "git", + "url": "git+https://github.com/tauri-apps/tauri.git" + }, + "homepage": "https://github.com/tauri-apps/tauri#readme", + "bugs": { + "url": "https://github.com/tauri-apps/tauri/issues" + }, + "contributors": [ + "Tauri Programme within The Commons Conservancy" + ], + "license": "Apache-2.0 OR MIT", "publishConfig": { "access": "public" }, @@ -17,7 +29,6 @@ "files": [ "cli.linux-x64-musl.node" ], - "license": "MIT", "engines": { "node": ">= 10" } diff --git a/tooling/cli/node/npm/win32-arm64-msvc/package.json b/tooling/cli/node/npm/win32-arm64-msvc/package.json index b7f379b04..8a7000f58 100644 --- a/tooling/cli/node/npm/win32-arm64-msvc/package.json +++ b/tooling/cli/node/npm/win32-arm64-msvc/package.json @@ -1,6 +1,18 @@ { "name": "@tauri-apps/cli-win32-arm64-msvc", "version": "0.0.0", + "repository": { + "type": "git", + "url": "git+https://github.com/tauri-apps/tauri.git" + }, + "homepage": "https://github.com/tauri-apps/tauri#readme", + "bugs": { + "url": "https://github.com/tauri-apps/tauri/issues" + }, + "contributors": [ + "Tauri Programme within The Commons Conservancy" + ], + "license": "Apache-2.0 OR MIT", "publishConfig": { "access": "public" }, @@ -14,7 +26,6 @@ "files": [ "cli.win32-arm64-msvc.node" ], - "license": "MIT", "engines": { "node": ">= 10" } diff --git a/tooling/cli/node/npm/win32-ia32-msvc/package.json b/tooling/cli/node/npm/win32-ia32-msvc/package.json index d91ed34da..54e0fa606 100644 --- a/tooling/cli/node/npm/win32-ia32-msvc/package.json +++ b/tooling/cli/node/npm/win32-ia32-msvc/package.json @@ -1,6 +1,18 @@ { "name": "@tauri-apps/cli-win32-ia32-msvc", "version": "0.0.0", + "repository": { + "type": "git", + "url": "git+https://github.com/tauri-apps/tauri.git" + }, + "homepage": "https://github.com/tauri-apps/tauri#readme", + "bugs": { + "url": "https://github.com/tauri-apps/tauri/issues" + }, + "contributors": [ + "Tauri Programme within The Commons Conservancy" + ], + "license": "Apache-2.0 OR MIT", "publishConfig": { "access": "public" }, @@ -14,7 +26,6 @@ "files": [ "cli.win32-ia32-msvc.node" ], - "license": "MIT", "engines": { "node": ">= 10" } diff --git a/tooling/cli/node/npm/win32-x64-msvc/package.json b/tooling/cli/node/npm/win32-x64-msvc/package.json index b1e5d30c1..edb078b36 100644 --- a/tooling/cli/node/npm/win32-x64-msvc/package.json +++ b/tooling/cli/node/npm/win32-x64-msvc/package.json @@ -1,6 +1,18 @@ { "name": "@tauri-apps/cli-win32-x64-msvc", "version": "0.0.0", + "repository": { + "type": "git", + "url": "git+https://github.com/tauri-apps/tauri.git" + }, + "homepage": "https://github.com/tauri-apps/tauri#readme", + "bugs": { + "url": "https://github.com/tauri-apps/tauri/issues" + }, + "contributors": [ + "Tauri Programme within The Commons Conservancy" + ], + "license": "Apache-2.0 OR MIT", "publishConfig": { "access": "public" }, @@ -14,7 +26,6 @@ "files": [ "cli.win32-x64-msvc.node" ], - "license": "MIT", "engines": { "node": ">= 10" } diff --git a/tooling/cli/node/package.json b/tooling/cli/node/package.json index 663de17fe..d7f004370 100644 --- a/tooling/cli/node/package.json +++ b/tooling/cli/node/package.json @@ -11,7 +11,7 @@ "url": "git+https://github.com/tauri-apps/tauri.git" }, "contributors": [ - "Tauri Team (https://tauri.app)" + "Tauri Programme within The Commons Conservancy" ], "license": "Apache-2.0 OR MIT", "bugs": {