Files
upstream-tauri/.github/workflows/publish-cli-js.yml
upstream-mirror feda81bf2f
Some checks failed
Audit / audit-js (push) Failing after 0s
bench / bench (map[os:ubuntu-latest runner:xvfb-run --auto-servernum target:x86_64-unknown-linux-gnu], nightly) (push) Failing after 0s
covector version or publish / run-integration-tests (ubuntu-latest) (push) Failing after 0s
Audit / audit-rust (push) Failing after 0s
test `@tauri-apps/cli` / test (ubuntu-latest) (push) Failing after 0s
test `tauri-cli` / test (map[os:ubuntu-latest target:x86_64-unknown-linux-gnu]) (push) Failing after 0s
test core / test (map[args:--all-features key:all], map[cargo:cargo command:test os:ubuntu-latest target:x86_64-unknown-linux-gnu toolchain:1.90]) (push) Failing after 0s
test core / test (map[args:--no-default-features key:no-default], map[cargo:cargo command:test os:ubuntu-latest target:x86_64-unknown-linux-gnu toolchain:1.90]) (push) Failing after 0s
test core / test (map[args:--no-default-features key:no-default], map[cargo:cross command:build os:ubuntu-latest target:aarch64-linux-android toolchain:1.90]) (push) Failing after 0s
deploy schema worker / deploy (push) Failing after 0s
lint rust / clippy (map[cargo:cargo include: os:ubuntu-latest target:x86_64-unknown-linux-gnu]) (push) Failing after 0s
lint rust / clippy (map[cargo:cross include:--package api os:ubuntu-latest target:aarch64-linux-android]) (push) Failing after 0s
supply chain health status / check rust dependencies with cargo vet (push) Failing after 0s
test `@tauri-apps/api` e2e (mobile) / android (push) Failing after 0s
test `@tauri-apps/api` e2e / test (map[name:Linux os:ubuntu-latest]) (push) Failing after 0s
test core / test (map[args:--all-features key:all], map[cargo:cross command:build os:ubuntu-latest target:aarch64-linux-android toolchain:1.90]) (push) Failing after 0s
Udeps / changes (push) Failing after 0s
Udeps / setup (push) Has been skipped
Udeps / udeps (push) Has been skipped
bench / bench (map[os:macos-latest runner: target:aarch64-apple-darwin], nightly) (push) Has been cancelled
bench / bench (map[os:windows-latest runner: target:x86_64-pc-windows-msvc], nightly) (push) Has been cancelled
covector version or publish / run-integration-tests (macos-latest) (push) Has been cancelled
covector version or publish / run-integration-tests (windows-latest) (push) Has been cancelled
covector version or publish / version-or-publish (push) Has been cancelled
test `@tauri-apps/cli` / test (macos-latest) (push) Has been cancelled
test `tauri-cli` / test (map[args:--no-default-features --features native-tls-vendored os:windows-latest restore-only:true target:aarch64-pc-windows-msvc]) (push) Has been cancelled
test `tauri-cli` / test (map[os:macos-latest target:x86_64-apple-darwin]) (push) Has been cancelled
test `tauri-cli` / test (map[os:windows-latest target:x86_64-pc-windows-msvc]) (push) Has been cancelled
test core / test (map[args:--all-features key:all], map[cargo:cargo command:build os:macos-latest target:aarch64-apple-ios toolchain:1.90]) (push) Has been cancelled
test core / test (map[args:--all-features key:all], map[cargo:cargo command:test os:macos-14 target:aarch64-apple-darwin toolchain:1.90]) (push) Has been cancelled
lint rust / clippy (map[cargo:cargo include: os:macos-latest target:aarch64-apple-darwin]) (push) Has been cancelled
lint rust / clippy (map[cargo:cargo include: os:windows-latest target:x86_64-pc-windows-msvc]) (push) Has been cancelled
lint rust / clippy (map[cargo:cargo include:--package api os:macos-latest target:aarch64-apple-ios]) (push) Has been cancelled
test `@tauri-apps/api` e2e (mobile) / ios (push) Has been cancelled
test `@tauri-apps/api` e2e / test (map[name:Windows os:windows-latest]) (push) Has been cancelled
test `@tauri-apps/api` e2e / test (map[name:macOS os:macos-latest]) (push) Has been cancelled
test `@tauri-apps/cli` / test (windows-latest) (push) Has been cancelled
test core / test (map[args:--all-features key:all], map[cargo:cargo command:test os:windows-latest target:x86_64-pc-windows-msvc toolchain:1.90]) (push) Has been cancelled
test core / test (map[args:--no-default-features key:no-default], map[cargo:cargo command:build os:macos-latest target:aarch64-apple-ios toolchain:1.90]) (push) Has been cancelled
test core / test (map[args:--no-default-features key:no-default], map[cargo:cargo command:test os:macos-14 target:aarch64-apple-darwin toolchain:1.90]) (push) Has been cancelled
test core / test (map[args:--no-default-features key:no-default], map[cargo:cargo command:test os:windows-latest target:x86_64-pc-windows-msvc toolchain:1.90]) (push) Has been cancelled
snapshot of https://github.com/tauri-apps/tauri.git (dev, 2026-09-23; blobs > 131072B omitted)
2026-09-23 17:00:42 +05:00

290 lines
9.4 KiB
YAML

# Copyright 2019-2024 Tauri Programme within The Commons Conservancy
# SPDX-License-Identifier: Apache-2.0
# SPDX-License-Identifier: MIT
name: publish `@tauri-apps/cli`
env:
DEBUG: napi:*
APP_NAME: cli
MACOSX_DEPLOYMENT_TARGET: '10.13'
on:
workflow_dispatch:
inputs:
releaseId:
description: 'ID of the `@tauri-apps/cli` release'
required: true
repository_dispatch:
types: [publish-js-cli]
defaults:
run:
working-directory: packages/cli/
permissions:
contents: write # update release
id-token: write # oidc token
jobs:
build:
strategy:
fail-fast: false
matrix:
settings:
- host: macos-latest
target: x86_64-apple-darwin
build: pnpm build --target=x86_64-apple-darwin
- host: macos-latest
target: aarch64-apple-darwin
build: pnpm build --target=aarch64-apple-darwin
- host: windows-latest
build: pnpm build --target=x86_64-pc-windows-msvc
target: x86_64-pc-windows-msvc
- host: windows-latest
build: pnpm build --target=i686-pc-windows-msvc
target: i686-pc-windows-msvc
- host: windows-latest
target: aarch64-pc-windows-msvc
build: pnpm build --target=aarch64-pc-windows-msvc
- host: ubuntu-latest
target: x86_64-unknown-linux-gnu
build: pnpm build --target=x86_64-unknown-linux-gnu --cross-compile
- host: ubuntu-latest
target: x86_64-unknown-linux-musl
build: pnpm build --target=x86_64-unknown-linux-musl --cross-compile
- host: ubuntu-latest
target: aarch64-unknown-linux-gnu
build: pnpm build --target=aarch64-unknown-linux-gnu --cross-compile
setup: |
sudo apt-get update
sudo apt-get install gcc-aarch64-linux-gnu g++-aarch64-linux-gnu -y
- host: ubuntu-latest
target: armv7-unknown-linux-gnueabihf
build: pnpm build --target=armv7-unknown-linux-gnueabihf --cross-compile
- host: ubuntu-latest
target: aarch64-unknown-linux-musl
build: pnpm build --target=aarch64-unknown-linux-musl --cross-compile
- host: ubuntu-latest
target: riscv64gc-unknown-linux-gnu
build: pnpm build --target=riscv64gc-unknown-linux-gnu --cross-compile
setup: |
sudo apt-get update
sudo apt-get install gcc-riscv64-linux-gnu g++-riscv64-linux-gnu -y
name: stable - ${{ matrix.settings.target }} - node@22
runs-on: ${{ matrix.settings.host }}
steps:
- uses: actions/checkout@v7
- run: npm i -g --force corepack
- name: Setup node
uses: actions/setup-node@v7
if: ${{ !matrix.settings.docker }}
with:
node-version: 22
cache: 'pnpm'
- name: Install Rust
uses: dtolnay/rust-toolchain@stable
with:
# CEF helper needs both archs
targets: ${{ contains(matrix.settings.target, 'apple-darwin') && 'aarch64-apple-darwin,x86_64-apple-darwin' || matrix.settings.target }}
- uses: mlugg/setup-zig@v2
if: ${{ contains(matrix.settings.target, 'linux') }}
with:
version: 0.14.1
- name: Install cargo-zigbuild
uses: taiki-e/install-action@v2
if: ${{ contains(matrix.settings.target, 'linux') }}
env:
GITHUB_TOKEN: ${{ github.token }}
with:
tool: cargo-zigbuild
- name: Setup toolchain
run: ${{ matrix.settings.setup }}
if: ${{ matrix.settings.setup }}
shell: bash
- name: Install dependencies
run: pnpm i --frozen-lockfile --ignore-scripts
- name: Build
run: ${{ matrix.settings.build }}
shell: bash
- name: Upload artifact
uses: actions/upload-artifact@v7
with:
name: bindings-${{ matrix.settings.target }}
path: packages/cli/${{ env.APP_NAME }}.*.node
if-no-files-found: error
test-macOS-windows-binding:
name: Test bindings on ${{ matrix.settings.target }} - node@${{ matrix.node }}
needs:
- build
strategy:
fail-fast: false
matrix:
settings:
- host: macos-latest
target: aarch64-apple-darwin
architecture: arm64
- host: windows-latest
target: x86_64-pc-windows-msvc
architecture: x64
- host: windows-11-arm
target: aarch64-pc-windows-msvc
architecture: arm64
- host: macos-latest
target: x86_64-apple-darwin
architecture: x64
node:
- '22'
- '24'
runs-on: ${{ matrix.settings.host }}
steps:
- uses: actions/checkout@v7
- run: npm i -g --force corepack
- name: Setup node
uses: actions/setup-node@v7
with:
node-version: ${{ matrix.node }}
cache: pnpm
architecture: ${{ matrix.settings.architecture }}
- name: Install dependencies
run: pnpm install --frozen-lockfile --ignore-scripts
- name: Download artifacts
uses: actions/download-artifact@v8
with:
name: bindings-${{ matrix.settings.target }}
path: 'packages/cli/'
- name: List packages
run: ls -R .
shell: bash
- name: Test bindings
run: pnpm test
test-linux-binding:
name: Test ${{ matrix.target }} - node@${{ matrix.node }}
needs:
- build
strategy:
fail-fast: false
matrix:
target:
- x86_64-unknown-linux-gnu
- x86_64-unknown-linux-musl
- aarch64-unknown-linux-gnu
- aarch64-unknown-linux-musl
- armv7-unknown-linux-gnueabihf
node:
- '22'
- '24'
runs-on: ${{ contains(matrix.target, 'aarch64') && 'ubuntu-24.04-arm' || 'ubuntu-latest' }}
steps:
- uses: actions/checkout@v7
- run: npm i -g --force corepack
- name: Setup node
uses: actions/setup-node@v7
with:
node-version: ${{ matrix.node }}
cache: pnpm
architecture: ${{ contains(matrix.target, 'aarch64') && 'arm64' || 'x64' }}
- name: Install dependencies
run: pnpm install --frozen-lockfile --ignore-scripts
- name: Download artifacts
uses: actions/download-artifact@v8
with:
name: bindings-${{ matrix.target }}
path: 'packages/cli/'
- name: List packages
run: ls -R .
shell: bash
- name: install system dependencies (gnu)
if: ${{ endsWith(matrix.target, 'gnu') }}
run: |
sudo apt-get update
sudo apt-get install -y webkit2gtk-4.1 libayatana-appindicator3-dev librsvg2-dev
- name: Setup and run tests (gnu)
if: ${{ endsWith(matrix.target, 'gnu') }}
run: pnpm test
# TODO: Actually run tests on musl and armv7
- name: Output docker params
id: docker
if: ${{ contains(matrix.target, 'musl') || contains(matrix.target, 'armv7') }}
run: |
node -e "
if ('${{ matrix.target }}'.startsWith('aarch64')) {
console.log('PLATFORM=linux/arm64')
} else if ('${{ matrix.target }}'.startsWith('armv7')) {
console.log('PLATFORM=linux/arm/v7')
} else {
console.log('PLATFORM=linux/amd64')
}
" >> $GITHUB_OUTPUT
node -e "
if ('${{ matrix.target }}'.endsWith('-musl')) {
console.log('IMAGE=node:${{ matrix.node }}-alpine')
} else {
console.log('IMAGE=node:22-slim')
}
" >> $GITHUB_OUTPUT
- name: Set up QEMU (armv7)
uses: docker/setup-qemu-action@v4
if: ${{ contains(matrix.target, 'armv7') }}
with:
platforms: all
- run: docker run --rm --privileged multiarch/qemu-user-static --reset -p yes
if: ${{ contains(matrix.target, 'armv7') }}
- name: Setup and run tests (musl | armv7)
uses: addnab/docker-run-action@v3
if: ${{ contains(matrix.target, 'musl') || contains(matrix.target, 'armv7') }}
with:
image: ${{ steps.docker.outputs.IMAGE }}
options: --volume ${{ github.workspace }}:${{ github.workspace }} --workdir ${{ github.workspace }}/packages/cli --platform ${{ steps.docker.outputs.PLATFORM }}
shell: sh
run: |
set -e
node tauri.js --help
ls -la
publish:
name: Publish
runs-on: ubuntu-latest
needs:
- test-macOS-windows-binding
- test-linux-binding
steps:
- uses: actions/checkout@v7
- run: npm i -g --force corepack
- name: Setup node
uses: actions/setup-node@v7
with:
node-version: 24
cache: 'pnpm'
- name: Install dependencies
run: pnpm i --frozen-lockfile --ignore-scripts
- name: Download all artifacts
uses: actions/download-artifact@v8
with:
path: packages/cli/artifacts
- name: Move artifacts
run: pnpm artifacts
- name: List packages
run: ls -R ./npm
shell: bash
- name: Publish
run: |
npm publish
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
NODE_AUTH_TOKEN: ''
RELEASE_ID: ${{ github.event.client_payload.releaseId || inputs.releaseId }}