Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add create archive step to CD workflow #280

Merged
merged 5 commits into from
Dec 13, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 16 additions & 0 deletions .distignore
Original file line number Diff line number Diff line change
@@ -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
11 changes: 11 additions & 0 deletions .github/workflows/continuous_deployment.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -53,14 +55,23 @@ 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 }}
commit: ${{ github.sha }}
name: Release ${{ needs.determine-if-deploy.outputs.version }}
body: ${{ env.content }}
prerelease: true
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is there a reason we create the release as a pre-release?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Synced with Claire offline on this. This needs to be a prerelease so it doesn't prematurely get picked up by packagist until it passes review by Adobe/M2.

artifacts: ${{ env.ZIP_FILE_NAME }}

- name: Send PagerDuty alert on failure
if: ${{ failure() }}
Expand Down
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -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