Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
49 changes: 7 additions & 42 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,6 @@ jobs:
name: Prepare Release
if: github.event_name == 'workflow_dispatch'
runs-on: ubuntu-latest
outputs:
version: ${{ steps.version.outputs.version }}
steps:
- uses: actions/checkout@v4
with:
Expand Down Expand Up @@ -82,41 +80,8 @@ jobs:
git tag "v$VERSION"
git push origin HEAD:${{ github.ref_name }} --tags

- name: Output version
id: version
run: echo "version=v${{ github.event.inputs.version }}" >> $GITHUB_OUTPUT

create-release:
name: Create Release
needs: [prepare]
if: always() && needs.prepare.result != 'failure'
runs-on: ubuntu-latest
outputs:
version: ${{ steps.get_version.outputs.version }}
steps:
- uses: actions/checkout@v4
- name: Get version
id: get_version
run: |
if [ "${{ github.event_name }}" = "workflow_dispatch" ]; then
echo "version=v${{ github.event.inputs.version }}" >> $GITHUB_OUTPUT
else
echo "version=${GITHUB_REF#refs/tags/}" >> $GITHUB_OUTPUT
fi
- name: Create Release
uses: softprops/action-gh-release@v2
with:
tag_name: ${{ steps.get_version.outputs.version }}
name: Release ${{ steps.get_version.outputs.version }}
draft: false
prerelease: false
generate_release_notes: true
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

build:
name: Build - ${{ matrix.platform.name }}
needs: create-release
runs-on: ${{ matrix.platform.runner }}
strategy:
fail-fast: false
Expand All @@ -127,25 +92,25 @@ jobs:
runner: windows-latest
target: x86_64-pc-windows-msvc
binary: ziro.exe
asset: ziro-windows-x86_64.zip
asset: windows-x64.zip
- name: Linux x64
os: linux
runner: ubuntu-latest
target: x86_64-unknown-linux-gnu
binary: ziro
asset: ziro-linux-x86_64.zip
asset: linux-x64.zip
- name: Linux ARM64
os: linux
runner: ubuntu-latest
target: aarch64-unknown-linux-gnu
binary: ziro
asset: ziro-linux-aarch64.zip
asset: linux-aarch64.zip
- name: macOS ARM64
os: macos
runner: macos-latest
target: aarch64-apple-darwin
binary: ziro
asset: ziro-macos-aarch64.zip
asset: macos-aarch64.zip
steps:
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@1.88.0
Expand Down Expand Up @@ -195,7 +160,7 @@ jobs:
- name: Upload Release Assets
uses: softprops/action-gh-release@v2
with:
tag_name: ${{ needs.create-release.outputs.version }}
tag_name: ${{ github.ref_name }}
files: |
${{ matrix.platform.asset }}
${{ matrix.platform.asset }}.sha256
Expand All @@ -204,7 +169,7 @@ jobs:

publish-crates:
name: Publish to crates.io
needs: [create-release, build]
needs: [build]
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
Expand All @@ -215,7 +180,7 @@ jobs:

publish-npm:
name: Publish to npm
needs: [create-release, build]
needs: [build]
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
Expand Down
2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "ziro"
version = "0.0.24"
version = "0.0.26"
edition = "2024"
authors = ["huangshan"]
description = "Cross-platform port management tool - quickly find and kill processes occupying ports"
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@ithinku/ziro",
"version": "0.0.24",
"version": "0.0.26",
"description": "跨平台端口管理工具 - 快速查找和终止占用端口的进程",
"main": "bin/ziro.js",
"bin": {
Expand Down
Loading