v0.5.3 #17
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Publish | |
on: | |
push: | |
tags: | |
- "v*.*.*" | |
permissions: | |
contents: write | |
jobs: | |
publish: | |
strategy: | |
fail-fast: false | |
matrix: | |
settings: | |
- host: macos-latest | |
target: x86_64-apple-darwin | |
build: cargo build --release | |
- host: macos-latest | |
target: aarch64-apple-darwin | |
build: | | |
sudo rm -Rf /Library/Developer/CommandLineTools/SDKs/*; | |
export CC=$(xcrun -f clang); | |
export CXX=$(xcrun -f clang++); | |
SYSROOT=$(xcrun --sdk macosx --show-sdk-path); | |
export CFLAGS="-isysroot $SYSROOT -isystem $SYSROOT"; | |
cargo build --release | |
- host: ubuntu-latest | |
target: x86_64-unknown-linux-gnu | |
build: cargo build --release | |
- host: ubuntu-latest | |
target: x86_64-unknown-linux-musl | |
build: cargo build --release | |
- host: windows-latest | |
target: x86_64-pc-windows-gnu | |
build: cargo build --release | |
name: ${{ matrix.settings.target }} | |
runs-on: ${{ matrix.settings.host }} | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Install | |
uses: actions-rs/toolchain@v1 | |
with: | |
profile: minimal | |
override: true | |
toolchain: stable | |
target: ${{ matrix.settings.target }} | |
- name: Build | |
run: ${{ matrix.settings.build }} | |
- name: Pack | |
if: matrix.settings.host != 'windows-latest' | |
run: | | |
mkdir dist | |
cp ./target/release/pnpm-shell-completion dist/ | |
cp ./pnpm-shell-completion.plugin.zsh dist/ | |
cp ./install.zsh dist/ | |
cp ./pnpm.fish dist/ | |
cp ./install.fish dist/ | |
cp ./README.md dist/ | |
cp ./LICENSE dist/ | |
cd dist | |
zip ../pnpm-shell-completion_${{ matrix.settings.target }}.zip ./* | |
tar -zcvf ../pnpm-shell-completion_${{ matrix.settings.target }}.tar.gz * | |
ls -l | |
cd .. | |
- name: Pack | |
shell: pwsh | |
run: | | |
if (Test-Path dist) { | |
Remove-Item -Recurse -Force dist | |
} | |
New-Item -ItemType Directory dist | |
if (Test-Path .\target\release\pnpm-shell-completion.exe) { | |
Copy-Item .\target\release\pnpm-shell-completion.exe dist | |
} | |
elseif (Test-Path .\target\release\pnpm-shell-completion) { | |
Copy-Item .\target\release\pnpm-shell-completion dist | |
} | |
Copy-Item .\pnpm-shell-completion.ps1 dist | |
Copy-Item .\README.md dist | |
Copy-Item .\LICENSE dist | |
Compress-Archive "dist\*" pnpm-shell-completion_pwsh_${{ matrix.settings.target }}.zip | |
- name: Release | |
uses: softprops/action-gh-release@v1 | |
with: | |
files: | | |
pnpm-shell-completion_*.zip | |
pnpm-shell-completion_*.tar.gz |