Skip to content

v3.0.0-beta8

v3.0.0-beta8 #131

name: Release and publish
on:
release:
types: [released, prereleased]
jobs:
upload_release_asset_production:
name: Upload the production zip asset to the release
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Bundle the production zip
run: make zip-prod
env:
VERSION: ${{ github.event.release.tag_name }}
- name: Publish the production zip
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GA_ACCESS_TOKEN }}
with:
upload_url: ${{ github.event.release.upload_url }}
asset_path: ./dist/${{ github.event.repository.name }}-${{ github.event.release.tag_name }}.zip
asset_name: ${{ github.event.repository.name }}-${{ github.event.release.tag_name }}.zip
asset_content_type: application/zip
upload_release_asset_integration:
name: Upload the integration zip asset to the release
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Bundle the integration zip
run: make zip-inte
env:
VERSION: ${{ github.event.release.tag_name }}
- name: Publish the integration zip
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GA_ACCESS_TOKEN }}
with:
upload_url: ${{ github.event.release.upload_url }}
asset_path: ./dist/${{ github.event.repository.name }}-${{ github.event.release.tag_name }}_integration.zip
asset_name: ${{ github.event.repository.name }}-${{ github.event.release.tag_name }}_integration.zip
asset_content_type: application/zip
publish_to_marketplace:
name: Publish the module to the addons marketplace
runs-on: ubuntu-latest
needs: upload_release_asset_production
if: "!github.event.release.prerelease"
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Download release asset
uses: dsaltares/fetch-gh-release-asset@master
with:
version: tags/${{ github.event.release.tag_name }}
file: ${{ github.event.repository.name }}-${{ github.event.release.tag_name }}.zip
token: ${{ secrets.GA_ACCESS_TOKEN }}
- name: Prepare publishing tool
run: |
composer global require prestashop/publish-on-marketplace
- name: Release zip
run: |
export CHANGELOG="${CHANGELOG:=No changelog provided}"
~/.composer/vendor/bin/publish-on-marketplace \
--archive=$PWD/${{ github.event.repository.name }}-${{ github.event.release.tag_name }}.zip \
--metadata-json=$PWD/.github/mktp-metadata.json \
--changelog="$CHANGELOG" \
--api-key="${{ secrets.MARKETPLACE_API_KEY }}" \
--debug
env:
CHANGELOG: ${{ github.event.release.body }}