build: update build script

This commit is contained in:
cxfksword 2023-12-02 16:42:13 +08:00
parent 17a2d093a6
commit e3a559d970
3 changed files with 6 additions and 5 deletions

View File

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

View File

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

View File

@ -56,7 +56,7 @@ def main():
raise raise
# 追加新版本/覆盖旧版本 # 追加新版本/覆盖旧版本
manifest[0]['versions'] = list(filter(lambda x: x['version'] == version, manifest[0]['versions'])) manifest[0]['versions'] = list(filter(lambda x: x['version'] != f"{version}.0", manifest[0]['versions']))
manifest[0]['versions'].insert(0, generate_version(filepath, version, changelog)) manifest[0]['versions'].insert(0, generate_version(filepath, version, changelog))
with open('manifest.json', 'w') as f: with open('manifest.json', 'w') as f: