From c2d8ee4341d83f39e844c3d877d43bdd86b71624 Mon Sep 17 00:00:00 2001 From: real-zony Date: Thu, 22 Sep 2022 12:57:14 +0800 Subject: [PATCH] ci: debug workflow. --- .github/workflows/dotnet.yml | 6 ++++-- src/ZonyLrcTools.Cli/publish.sh | 28 ++++++++++++++-------------- 2 files changed, 18 insertions(+), 16 deletions(-) diff --git a/.github/workflows/dotnet.yml b/.github/workflows/dotnet.yml index c7bb5d3..5c83c2d 100644 --- a/.github/workflows/dotnet.yml +++ b/.github/workflows/dotnet.yml @@ -19,8 +19,8 @@ jobs: uses: actions/setup-dotnet@v2 with: dotnet-version: 6.0.x - # - name: Restore dependencies - # run: dotnet restore + - name: Restore dependencies + run: dotnet restore - name: Publish working-directory: ./src/ZonyLrcTools.Cli run: | @@ -29,6 +29,8 @@ jobs: shell: bash env: VERSION: ${{ steps.date.outputs.date }} + - name: ls + run: ls -a # - name: Upload Release # uses: ncipollo/release-action@v1 # with: diff --git a/src/ZonyLrcTools.Cli/publish.sh b/src/ZonyLrcTools.Cli/publish.sh index 892e95c..8ee75f8 100755 --- a/src/ZonyLrcTools.Cli/publish.sh +++ b/src/ZonyLrcTools.Cli/publish.sh @@ -1,21 +1,21 @@ #!/bin/bash echo "${VERSION}" -# Platforms=('win-x64' 'linux-x64' 'osx-x64') +Platforms=('win-x64' 'linux-x64' 'osx-x64') -# if ! [ -d './TempFiles' ]; -# then -# mkdir ./TempFiles -# fi +if ! [ -d './TempFiles' ]; +then + mkdir ./TempFiles +fi -# rm -rf ./TempFiles/* +rm -rf ./TempFiles/* -# for platform in "${Platforms[@]}" -# do -# dotnet publish -r "$platform" -c Release -p:PublishSingleFile=true -p:PublishTrimmed=true --self-contained true +for platform in "${Platforms[@]}" +do + dotnet publish -r "$platform" -c Release -p:PublishSingleFile=true -p:PublishTrimmed=true --self-contained true -# cd ./bin/Release/net6.0/"$platform"/publish/ || exit -# zip -r ./ZonyLrcTools_"$platform"_"${steps.date.outputs.date}".zip ./ -# cd ../../../../../ + cd ./bin/Release/net6.0/"$platform"/publish/ || exit + zip -r ./ZonyLrcTools_"$platform"_"${VERSION}".zip ./ + cd ../../../../../ -# mv ./bin/Release/net6.0/"$platform"/publish/ZonyLrcTools_"$platform"_"$Version".zip ./TempFiles -# done \ No newline at end of file + mv ./bin/Release/net6.0/"$platform"/publish/ZonyLrcTools_"$platform"_"$Version".zip ./TempFiles +done \ No newline at end of file