Skip to content

Commit

Permalink
fix: update github-ci
Browse files Browse the repository at this point in the history
  • Loading branch information
tinect committed May 11, 2021
1 parent f4d5b8a commit 18e3739
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 37 deletions.
42 changes: 6 additions & 36 deletions .github/workflows/pack-plugin.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,17 +10,12 @@ env:
PLUGIN_NAME: FroshPlatformThumbnailProcessor
ACCOUNT_USER: ${{ secrets.ACCOUNT_USER }}
ACCOUNT_PASSWORD: ${{ secrets.ACCOUNT_PASSWORD }}
PLUGIN_UPLOADER_VERSION: 0.3.2

jobs:
CreateZip:
pack:
runs-on: ubuntu-latest
container: ghcr.io/friendsofshopware/platform-plugin-dev:v6.3.2
container: ghcr.io/friendsofshopware/platform-plugin-dev:v6.3.4
steps:
- name: Get the version
id: get_version
run: echo ::set-output name=VERSION::${GITHUB_REF#refs/tags/}

- name: Checkout
uses: actions/checkout@v2.3.1
with:
Expand All @@ -31,47 +26,22 @@ jobs:
npm install --prefix "./${PLUGIN_NAME}/src/Resources/app/storefront/"
cp -r "./${PLUGIN_NAME}" "/plugins/${PLUGIN_NAME}"
start-mysql
plugin-uploader ext:prepare /plugins/${PLUGIN_NAME}/
pack-plugin "${PLUGIN_NAME}"
- name: Upload Artefact
uses: actions/upload-artifact@v2
with:
name: ${{ env.PLUGIN_NAME }}
path: ${{ env.PLUGIN_NAME }}.zip

- name: getPluginUploader
run: wget 'https://github.com/FriendsOfShopware/FroshPluginUploader/releases/download/${{ env.PLUGIN_UPLOADER_VERSION }}/frosh-plugin-upload.phar' -O frosh-plugin-upload.phar

- name: Validate Zip
run: php frosh-plugin-upload.phar ext:validate $(pwd)/${PLUGIN_NAME}.zip
run: plugin-uploader ext:validate $(pwd)/${PLUGIN_NAME}.zip

- name: Update store informations
run: php frosh-plugin-upload.phar ext:update $(pwd)/${PLUGIN_NAME}/
run: plugin-uploader ext:update $(pwd)/${PLUGIN_NAME}/

- name: Upload to store
if: startsWith(github.ref, 'refs/tags/')
run: php frosh-plugin-upload.phar ext:upload $(pwd)/${PLUGIN_NAME}.zip

- name: Create Release in github
if: startsWith(github.ref, 'refs/tags/')
id: create_release
uses: actions/create-release@v1.0.0
run: plugin-uploader ext:upload $(pwd)/${PLUGIN_NAME}.zip --createRelease
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
tag_name: ${{ steps.get_version.outputs.VERSION }}
release_name: ${{ steps.get_version.outputs.VERSION }}
draft: false
prerelease: false

- name: Upload Release Asset to github
if: startsWith(github.ref, 'refs/tags/')
id: upload_release_asset
uses: actions/upload-release-asset@v1.0.2
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ steps.create_release.outputs.upload_url }}
asset_path: ${{ env.PLUGIN_NAME }}.zip
asset_name: ${{ env.PLUGIN_NAME }}-${{ steps.get_version.outputs.VERSION }}.zip
asset_content_type: application/zip
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
}
],
"require": {
"shopware/core": "~6.3"
"shopware/core": "~6.3|~6.4"
},
"extra": {
"shopware-plugin-class": "Frosh\\ThumbnailProcessor\\FroshPlatformThumbnailProcessor",
Expand Down

0 comments on commit 18e3739

Please sign in to comment.