Skip to content

Support idle and freq anslysis (#54) #22

Support idle and freq anslysis (#54)

Support idle and freq anslysis (#54) #22

name: Release_CLI_Stable
on:
push:
tags:
- "*.*.*"
- "!*.*.*-beta*"
- "!*.*.*-rc*"
jobs:
publish_cli:
name: Build and upload cli artifact
runs-on: ubuntu-latest
strategy:
matrix:
targets:
[
"linux-x64",
"linux-musl-x64",
"linux-arm",
"linux-arm64",
"osx-x64",
"win-x86",
"win-arm",
"win-x64",
"win-arm64"
]
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Setup .NET SDK 7.0.x
uses: actions/setup-dotnet@v3
with:
dotnet-version: 7.0.x
- name: Publish .NET app
env:
RID: ${{ matrix.targets }}
VERSION: ${{ github.ref_name }}
run: dotnet publish src/RDBCli/RDBCli.csproj -c Release -r $RID -p:PublishSingleFile=true -p:PublishTrimmed=true -p:DebugType=None -p:DebugSymbols=false -p:EnableCompressionInSingleFile=true --self-contained true --output /home/runner/work/clis/$RID
- name: Package assets
env:
RID: ${{ matrix.targets }}
VERSION: ${{ github.ref_name }}
run: |
mkdir /home/runner/work/release
ls /home/runner/work/clis/
zip -j /home/runner/work/release/rdb-cli.$VERSION.$RID.zip /home/runner/work/clis/$RID/*
- name: Upload artifacts
uses: actions/upload-artifact@v3
with:
name: rdb-cli
path: /home/runner/work/release
publish_windows_x64_and_arm_aot:
name: Build and upload windows x64 and arm64 aot cli artifact
runs-on: windows-latest
strategy:
matrix:
targets:
[
"win-x64",
"win-arm64"
]
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Setup .NET SDK 7.0.x
uses: actions/setup-dotnet@v3
with:
dotnet-version: 7.0.x
- name: Publish .NET app
env:
RID: ${{ matrix.targets }}
VERSION: ${{ github.ref_name }}
run: dotnet publish src/RDBCli/RDBCli.csproj -c Release -r $($env:RID) -p:UseAot=true -p:DebugType=None -p:DebugSymbols=false --self-contained true --output ../publish/$($env:RID)
- name: Package assets
env:
RID: ${{ matrix.targets }}
VERSION: ${{ github.ref_name }}
run: |
mkdir ../release
rm -fo ../publish/$($env:RID)/*.pdb
ls ../publish/
Compress-Archive -Path ../publish/$($env:RID)/* -DestinationPath ../release/rdb-cli.$($env:VERSION).$($env:RID).aot.zip
- name: Upload artifacts
uses: actions/upload-artifact@v3
with:
name: rdb-cli
path: D:/a/rdb-tools/release
release_cli:
name: Publish release
needs: ['publish_cli','publish_windows_x64_and_arm_aot']
runs-on: ubuntu-latest
steps:
- name: Download build artifacts
uses: actions/download-artifact@v3
with:
name: rdb-cli
path: rdb-cli
- name: list rdb-cli
run: ls rdb-cli
- name: Release
uses: softprops/action-gh-release@v1
if: startsWith(github.ref, 'refs/tags/')
with:
files: rdb-cli/**
generate_release_notes: true