From c6e7b8c561fa360e9b36a2ac3d6cce7fca8fd1f6 Mon Sep 17 00:00:00 2001 From: qiaofeng1227 <76487013@qq.com> Date: Wed, 15 Nov 2023 10:51:43 +0800 Subject: [PATCH] appstore --- .github/workflows/upload_artifact.yml | 30 +++++++++++++-------------- appstore.json | 2 +- 2 files changed, 16 insertions(+), 16 deletions(-) diff --git a/.github/workflows/upload_artifact.yml b/.github/workflows/upload_artifact.yml index 5591019eb..799623fad 100644 --- a/.github/workflows/upload_artifact.yml +++ b/.github/workflows/upload_artifact.yml @@ -12,7 +12,7 @@ jobs: runs-on: ubuntu-latest env: CI: false - + appname: appstore steps: - uses: actions/checkout@v2 @@ -30,7 +30,7 @@ jobs: - name: Version convert id: convert_version run: | - version=$(jq -r '.Version' appstore.json) + version=$(jq -r '.Version' "${{ env.appname }}.json") version_core=${version%%-*} echo "VERSION=$version" >> $GITHUB_OUTPUT echo "VERSION_CORE=$version_core" >> $GITHUB_OUTPUT @@ -41,14 +41,14 @@ jobs: echo "release version" echo "CHANNEL=release" >> $GITHUB_OUTPUT fi - + - name: Update CHANGELOG.md and public/manifest.json id: update_data run: | changelog=$(cat changelog_latest.md) echo "CHANGELOG<> $GITHUB_OUTPUT echo "$changelog" >> $GITHUB_OUTPUT - echo "EOF" >> $GITHUB_OUTPUT + echo "EOF" >> $GITHUB_OUTPUT current_date=$(date +%Y-%m-%d) printf "## ${{ steps.convert_version.outputs.VERSION }} release on $current_date\n$changelog\n$(cat CHANGELOG.md)" > temp.txt mv temp.txt CHANGELOG.md @@ -63,16 +63,16 @@ jobs: - name: Create Zip Archive run: | mkdir artifacts - mv build appstore - cp CHANGELOG.md appstore - cp appstore.json appstore - cp -r docs appstore - rsync -av --exclude='changelog_latest.md' *.md appstore/ - zip -r appstore-${{ steps.convert_version.outputs.VERSION_CORE }}.zip appstore/ + mv build ${{ env.appname }} + cp CHANGELOG.md ${{ env.appname }} + cp ${{ env.appname }}.json ${{ env.appname }} + cp -r docs ${{ env.appname }} + rsync -av --exclude='changelog_latest.md' *.md ${{ env.appname }}/ + zip -r ${{ env.appname }}-${{ steps.convert_version.outputs.VERSION_CORE }}.zip ${{ env.appname }}/ cp CHANGELOG.md artifacts/ - cp appstore.json artifacts/ - mv appstore-${{ steps.convert_version.outputs.VERSION_CORE }}.zip artifacts/ - cp artifacts/appstore-${{ steps.convert_version.outputs.VERSION_CORE }}.zip artifacts/appstore-latest.zip + cp ${{ env.appname }}.json artifacts/ + mv ${{ env.appname }}-${{ steps.convert_version.outputs.VERSION_CORE }}.zip artifacts/ + cp artifacts/${{ env.appname }}-${{ steps.convert_version.outputs.VERSION_CORE }}.zip artifacts/${{ env.appname }}-latest.zip - name: Upload To Azure Blob uses: LanceMcCarthy/Action-AzureBlobUpload@v2 @@ -80,7 +80,7 @@ jobs: connection_string: ${{ secrets.AZURE_STORAGE_ARTIFACT }} container_name: ${{ steps.convert_version.outputs.CHANNEL }} source_folder: artifacts/ - destination_folder: ./websoft9/plugin/appstore + destination_folder: ./websoft9/plugin/${{ env.appname }} delete_if_exists: true fail_if_source_empty: true @@ -88,7 +88,7 @@ jobs: uses: softprops/action-gh-release@v1 with: files: | - appstore.json + ${{ env.appname }}.json tag_name: ${{ steps.convert_version.outputs.VERSION }} title: Release-${{ steps.convert_version.outputs.VERSION }} body: ${{ steps.update_data.outputs.CHANGELOG }} diff --git a/appstore.json b/appstore.json index 8809ad973..bf5e18900 100644 --- a/appstore.json +++ b/appstore.json @@ -3,7 +3,7 @@ "Repository": "https://github.com/Websoft9/plugin-appstore", "Update URI": "https://example.com/my-plugin/", "Description": "200 application template for you installation.", - "Version": "0.0.9-rc1", + "Version": "0.0.9-rc2", "Requires at most": "0.8.20", "Requires at least": "0.0.2", "Author": "Websoft9 Inc",