Skip to content

Commit

Permalink
fix(ci): @tauri-apps/cli publish workflow (#10659)
Browse files Browse the repository at this point in the history
* fix(ci): pnpm install

* fix setup-node

* node16 setup fails somehow

* remove unnecessary install deps step

* run nodejs directly

* fix permissions

* fix metadata
  • Loading branch information
lucasfernog authored Aug 17, 2024
1 parent dcc62e6 commit 23a912b
Show file tree
Hide file tree
Showing 12 changed files with 132 additions and 30 deletions.
30 changes: 11 additions & 19 deletions .github/workflows/publish-cli-js.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
Expand Down Expand Up @@ -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
Expand All @@ -199,7 +198,6 @@ jobs:
- host: windows-latest
target: x86_64-pc-windows-msvc
node:
- '16'
- '18'
- '20'
runs-on: ${{ matrix.settings.host }}
Expand All @@ -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:
Expand All @@ -232,7 +229,6 @@ jobs:
fail-fast: false
matrix:
node:
- '16'
- '18'
- '20'
runs-on: ubuntu-latest
Expand All @@ -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:
Expand All @@ -269,7 +264,6 @@ jobs:
fail-fast: false
matrix:
node:
- '16'
- '18'
- '20'
runs-on: ubuntu-latest
Expand All @@ -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:
Expand All @@ -312,7 +305,6 @@ jobs:
fail-fast: false
matrix:
node:
- '16'
- '18'
- '20'
image:
Expand All @@ -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:
Expand Down Expand Up @@ -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
Expand All @@ -367,17 +357,19 @@ 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
- name: Setup node
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:
Expand Down
13 changes: 12 additions & 1 deletion tooling/cli/node/npm/darwin-arm64/package.json
Original file line number Diff line number Diff line change
@@ -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"
},
Expand All @@ -14,7 +26,6 @@
"files": [
"cli.darwin-arm64.node"
],
"license": "MIT",
"engines": {
"node": ">= 10"
}
Expand Down
13 changes: 12 additions & 1 deletion tooling/cli/node/npm/darwin-x64/package.json
Original file line number Diff line number Diff line change
@@ -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"
},
Expand All @@ -14,7 +26,6 @@
"files": [
"cli.darwin-x64.node"
],
"license": "MIT",
"engines": {
"node": ">= 10"
}
Expand Down
13 changes: 12 additions & 1 deletion tooling/cli/node/npm/linux-arm-gnueabihf/package.json
Original file line number Diff line number Diff line change
@@ -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"
},
Expand All @@ -14,7 +26,6 @@
"files": [
"cli.linux-arm-gnueabihf.node"
],
"license": "MIT",
"engines": {
"node": ">= 10"
}
Expand Down
13 changes: 12 additions & 1 deletion tooling/cli/node/npm/linux-arm64-gnu/package.json
Original file line number Diff line number Diff line change
@@ -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"
},
Expand All @@ -17,7 +29,6 @@
"files": [
"cli.linux-arm64-gnu.node"
],
"license": "MIT",
"engines": {
"node": ">= 10"
}
Expand Down
13 changes: 12 additions & 1 deletion tooling/cli/node/npm/linux-arm64-musl/package.json
Original file line number Diff line number Diff line change
@@ -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"
},
Expand All @@ -17,7 +29,6 @@
"files": [
"cli.linux-arm64-musl.node"
],
"license": "MIT",
"engines": {
"node": ">= 10"
}
Expand Down
13 changes: 12 additions & 1 deletion tooling/cli/node/npm/linux-x64-gnu/package.json
Original file line number Diff line number Diff line change
@@ -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"
},
Expand All @@ -17,7 +29,6 @@
"files": [
"cli.linux-x64-gnu.node"
],
"license": "MIT",
"engines": {
"node": ">= 10"
}
Expand Down
13 changes: 12 additions & 1 deletion tooling/cli/node/npm/linux-x64-musl/package.json
Original file line number Diff line number Diff line change
@@ -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"
},
Expand All @@ -17,7 +29,6 @@
"files": [
"cli.linux-x64-musl.node"
],
"license": "MIT",
"engines": {
"node": ">= 10"
}
Expand Down
13 changes: 12 additions & 1 deletion tooling/cli/node/npm/win32-arm64-msvc/package.json
Original file line number Diff line number Diff line change
@@ -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"
},
Expand All @@ -14,7 +26,6 @@
"files": [
"cli.win32-arm64-msvc.node"
],
"license": "MIT",
"engines": {
"node": ">= 10"
}
Expand Down
13 changes: 12 additions & 1 deletion tooling/cli/node/npm/win32-ia32-msvc/package.json
Original file line number Diff line number Diff line change
@@ -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"
},
Expand All @@ -14,7 +26,6 @@
"files": [
"cli.win32-ia32-msvc.node"
],
"license": "MIT",
"engines": {
"node": ">= 10"
}
Expand Down
Loading

0 comments on commit 23a912b

Please sign in to comment.