build: update build script
This commit is contained in:
parent
17a2d093a6
commit
e3a559d970
|
@ -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
|
||||
|
|
|
@ -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:
|
||||
|
|
|
@ -56,7 +56,7 @@ def main():
|
|||
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))
|
||||
|
||||
with open('manifest.json', 'w') as f:
|
||||
|
|
Loading…
Reference in New Issue