mirror of
https://github.com/immich-app/walkrs.git
synced 2026-09-30 13:32:57 +08:00
82 lines
2.6 KiB
YAML
82 lines
2.6 KiB
YAML
name: Publish
|
|
|
|
on:
|
|
release:
|
|
types: [published]
|
|
|
|
permissions:
|
|
contents: read
|
|
id-token: write
|
|
|
|
jobs:
|
|
build:
|
|
strategy:
|
|
fail-fast: false
|
|
matrix:
|
|
platforms:
|
|
- host: ubuntu-latest
|
|
target: x86_64-unknown-linux-gnu
|
|
- host: ubuntu-latest
|
|
target: aarch64-unknown-linux-gnu
|
|
- host: ubuntu-latest
|
|
target: x86_64-unknown-linux-musl
|
|
- host: ubuntu-latest
|
|
target: aarch64-unknown-linux-musl
|
|
- host: macos-latest
|
|
target: x86_64-apple-darwin
|
|
- host: macos-latest
|
|
target: aarch64-apple-darwin
|
|
- host: windows-latest
|
|
target: x86_64-pc-windows-msvc
|
|
name: Build ${{ matrix.platforms.target }}
|
|
runs-on: ${{ matrix.platforms.host }}
|
|
steps:
|
|
- name: Checkout code
|
|
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6
|
|
with:
|
|
persist-credentials: false
|
|
- name: Setup Mise
|
|
uses: immich-app/devtools/actions/use-mise@dab18118da6476e8237ac94080fd937983fecd42 # use-mise-action-v1.1.2
|
|
- name: Install Rust
|
|
uses: dtolnay/rust-toolchain@efa25f7f19611383d5b0ccf2d1c8914531636bf9
|
|
with:
|
|
toolchain: stable
|
|
targets: ${{ matrix.settings.target }}
|
|
- name: Install dependencies
|
|
run: pnpm install
|
|
- name: Build
|
|
run: pnpm build --target ${{ matrix.settings.target }} --release
|
|
- name: Upload artifacts
|
|
uses: actions/upload-artifact@b7c566a772e6b6bfb58ed0dc250532a479d7789f # v6
|
|
with:
|
|
name: bindings-${{ matrix.settings.target }}
|
|
path: dist/*.node
|
|
if-no-files-found: error
|
|
|
|
publish:
|
|
name: Publish to npm
|
|
runs-on: ubuntu-latest
|
|
needs: [build]
|
|
permissions:
|
|
contents: read
|
|
id-token: write
|
|
steps:
|
|
- name: Checkout code
|
|
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6
|
|
with:
|
|
persist-credentials: false
|
|
- name: Setup Mise
|
|
uses: immich-app/devtools/actions/use-mise@dab18118da6476e8237ac94080fd937983fecd42 # use-mise-action-v1.1.2
|
|
- name: Install dependencies
|
|
run: pnpm install
|
|
- name: Download all artifacts
|
|
uses: actions/download-artifact@37930b1c2abaa49bbe596cd826c3c89aef350131 # v7
|
|
with:
|
|
path: artifacts
|
|
- name: Move artifacts to dist
|
|
run: pnpm napi artifacts
|
|
- name: List dist contents
|
|
run: ls -R ./dist
|
|
- name: Publish
|
|
run: pnpm publish --access public --provenance --no-git-checks
|