diff --git a/.distignore b/.distignore new file mode 100644 index 0000000..72bf60b --- /dev/null +++ b/.distignore @@ -0,0 +1,16 @@ +/docs +.changelogger* +.dev +.DS_Store +.git +.github +.gitignore +.idea +.phpunit.* +.phpcs.* +.python-version +.pre-commit-config.yaml +CHANGELOG.md +README.md +makefile +.distignore diff --git a/.github/workflows/continuous_deployment.yml b/.github/workflows/continuous_deployment.yml index dcede8d..e4238bf 100644 --- a/.github/workflows/continuous_deployment.yml +++ b/.github/workflows/continuous_deployment.yml @@ -32,6 +32,8 @@ jobs: runs-on: ubuntu-latest needs: determine-if-deploy if: needs.determine-if-deploy.outputs.deploy == 'true' + env: + ZIP_FILE_NAME: klaviyo_reclaim-${{ needs.determine-if-deploy.outputs.version }}.zip steps: - uses: actions/checkout@v3 - name: Setup Python 3.11 @@ -53,7 +55,15 @@ jobs: changelogger notes $VERSION --no-pretty >> $GITHUB_ENV echo ${DELIMITER} >> $GITHUB_ENV + - name: Create Archive + # Create zip archive for release to composer repository (Packagist) + run: | + wrapper_dir="magento2-klaviyo" + rsync -rc --exclude-from=".distignore" "$GITHUB_WORKSPACE/" $wrapper_dir/ --delete --delete-excluded + zip -r ${{ env.ZIP_FILE_NAME }} ./$wrapper_dir + - name: Create GitHub Tag & Release + # Creates GH tag and release, adds zip archive as artifact to release. uses: ncipollo/release-action@v1 with: tag: ${{ needs.determine-if-deploy.outputs.version }} @@ -61,6 +71,7 @@ jobs: name: Release ${{ needs.determine-if-deploy.outputs.version }} body: ${{ env.content }} prerelease: true + artifacts: ${{ env.ZIP_FILE_NAME }} - name: Send PagerDuty alert on failure if: ${{ failure() }} diff --git a/.gitignore b/.gitignore index 11ef3f5..11eb30f 100644 --- a/.gitignore +++ b/.gitignore @@ -206,3 +206,6 @@ fabric.properties /build/ # End of https://www.toptal.com/developers/gitignore/api/phpunit,php-cs-fixer,phpcodesniffer,phpstorm,phpstorm+all + +# pyenv +.python-version