Master Release #18
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Master Release | |
run-name: "Master Release" | |
on: [pull_request] | |
# push: | |
# branches: | |
# - 'master' | |
jobs: | |
determine-if-deploy: | |
runs-on: ubuntu-latest | |
outputs: | |
deploy: ${{ steps.tag_exists.outputs.exists == 'false' }} | |
version: ${{ steps.latest_version.outputs.version }} | |
steps: | |
- uses: actions/checkout@v3 | |
- uses: actions/[email protected] | |
with: | |
python-version: "3.11" | |
- name: Install Changelogger | |
run: pip install changelogged==0.11.3 | |
- name: Get Latest Version | |
id: latest_version | |
run: | | |
VERSION=$(changelogger versions --latest) | |
echo "version=${VERSION}" >> $GITHUB_OUTPUT | |
- uses: mukunku/[email protected] | |
id: tag_exists | |
with: | |
tag: ${{ steps.latest_version.outputs.version }} | |
github-tag-and-release: | |
runs-on: ubuntu-latest | |
needs: determine-if-deploy | |
# if: needs.determine-if-deploy.outputs.deploy == 'true' | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Setup Python 3.11 | |
uses: actions/[email protected] | |
with: | |
python-version: '3.11' | |
- name: Install Changelogger | |
run: pip install changelogged==0.11.3 | |
- name: Get Changelog Contents | |
id: changelog | |
run: | | |
DELIMITER=$(openssl rand -base64 12) | |
VERSION=${{ needs.determine-if-deploy.outputs.version }} | |
# Need to capture multiline output in env to preserve newlines | |
echo "content<<${DELIMITER}" >> $GITHUB_ENV | |
# Add changelog content to the env for release notes | |
changelogger notes $VERSION --no-pretty >> $GITHUB_ENV | |
echo ${DELIMITER} >> $GITHUB_ENV | |
- name: Exclude files | |
run: | | |
wrapper_dir="magento2-klaviyo" | |
mkdir $wrapper_dir | |
rsync -rc --exclude-from=".distignore" "$GITHUB_WORKSPACE/" $wrapper_dir/ --delete --delete-excluded | |
ls -al $wrapper_dir | |
# - name: Create Archive | |
# uses: thedoctor0/[email protected] | |
# with: | |
# type: 'zip' | |
# filename: "klaviyo_reclaim-${{ needs.determine-if-deploy.outputs.version }}.zip" | |
# exclusions: '*.git* ' | |
# | |
# - name: Temp - upload zip for testing | |
# uses: actions/upload-artifact@v3 | |
# with: | |
# path: "klaviyo_reclaim-${{ needs.determine-if-deploy.outputs.version }}.zip" | |
# - name: Create GitHub Tag & 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 | |
# - name: Send PagerDuty alert on failure | |
# if: ${{ failure() }} | |
# uses: award28/[email protected] | |
# with: | |
# pagerduty-integration-key: '${{ secrets.PAGERDUTY_INTEGRATION_KEY }}' | |
# pagerduty-dedup-key: magento_two_cd | |
integration-release: | |
runs-on: ubuntu-latest | |
needs: [determine-if-deploy, github-tag-and-release] | |
steps: | |
- run: echo "Releasing to Magento2" | |
# - name: Send PagerDuty alert on failure | |
# if: ${{ failure() }} | |
# uses: award28/[email protected] | |
# with: | |
# pagerduty-integration-key: '${{ secrets.PAGERDUTY_INTEGRATION_KEY }}' | |
# pagerduty-dedup-key: magento_two_cd |