Skip to content

Commit

Permalink
appstore
Browse files Browse the repository at this point in the history
  • Loading branch information
qiaofeng1227 committed Nov 15, 2023
1 parent 8f7e705 commit c6e7b8c
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 16 deletions.
30 changes: 15 additions & 15 deletions .github/workflows/upload_artifact.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ jobs:
runs-on: ubuntu-latest
env:
CI: false

appname: appstore
steps:
- uses: actions/checkout@v2

Expand All @@ -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
Expand All @@ -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<<EOF" >> $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
Expand All @@ -63,32 +63,32 @@ 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
with:
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

- name: Create Release
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 }}
Expand Down
2 changes: 1 addition & 1 deletion appstore.json
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down

0 comments on commit c6e7b8c

Please sign in to comment.