build: update build script

This commit is contained in:
cxfksword
2023-12-02 16:49:18 +08:00
parent b0e670ed58
commit bfaf9acbdd
3 changed files with 6 additions and 5 deletions

View File

@@ -31,8 +31,8 @@ jobs:
run: |
VERSION=$(echo "${GITHUB_REF#refs/*/}" | sed s/^v//)
VERSION="$VERSION.0"
echo ::set-output name=VERSION::${VERSION}
echo ::set-output name=APP_NAME::$(echo '${{ github.repository }}' | awk -F '/' '{print $2}')
echo "VERSION=${VERSION}" >> $GITHUB_OUTPUT
echo "APP_NAME=$(echo '${{ github.repository }}' | awk -F '/' '{print $2}')" >> $GITHUB_OUTPUT
- name: Build
run: |
dotnet restore ${{ env.project }} --no-cache

View File

@@ -36,8 +36,8 @@ jobs:
run: |
VERSION=$(echo "${GITHUB_REF#refs/*/}" | sed s/^v//)
VERSION="$VERSION.0"
echo ::set-output name=VERSION::${VERSION}
echo ::set-output name=APP_NAME::$(echo '${{ github.repository }}' | awk -F '/' '{print $2}')
echo "VERSION=${VERSION}" >> $GITHUB_OUTPUT
echo "APP_NAME=$(echo '${{ github.repository }}' | awk -F '/' '{print $2}')" >> $GITHUB_OUTPUT
- name: Build
run: |
dotnet restore ${{ env.project }} --no-cache
@@ -55,6 +55,7 @@ jobs:
destination_dir: ${{ env.artifact }}
publish_branch: master
publish_dir: ./artifacts
keep_files: true
- name: Publish release
uses: svenstaro/upload-release-action@v2
with: