build: update build script
This commit is contained in:
parent
17a2d093a6
commit
e3a559d970
|
@ -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
|
||||||
|
|
|
@ -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:
|
||||||
|
|
|
@ -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:
|
||||||
|
|
Loading…
Reference in New Issue