From a4a7f8fdccc3293a3445e4ac71739c79935fba75 Mon Sep 17 00:00:00 2001 From: Patrick Joyce Date: Sat, 14 Sep 2024 10:00:58 -0400 Subject: [PATCH 1/7] publish latest releases to wp --- .github/workflows/latest.yml | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/.github/workflows/latest.yml b/.github/workflows/latest.yml index 726188ce..6fb39245 100644 --- a/.github/workflows/latest.yml +++ b/.github/workflows/latest.yml @@ -86,6 +86,14 @@ jobs: run: | aws s3 cp artifacts/${ARTIFACT_FILENAME} s3://${{ secrets.S3_BUCKET }}/bmlt-workflow/${ARTIFACT_FILENAME} + - name: Publish Release to Latest WP 🎉 + id: publish_latest + uses: bmlt-enabled/wordpress-releases-github-action@v1.3 + with: + file: artifacts/${ARTIFACT_FILENAME} + s3_key: bmlt-workflow + aws_account_id: ${{ secrets.AWS_ACCOUNT_ID }} + - uses: act10ns/slack@v1 with: status: ${{ job.status }} From c24548a2bf68811777c02c6f9d0d14857d4a6bd6 Mon Sep 17 00:00:00 2001 From: Patrick Joyce Date: Sat, 14 Sep 2024 10:10:42 -0400 Subject: [PATCH 2/7] fix filename --- .github/workflows/latest.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/latest.yml b/.github/workflows/latest.yml index 6fb39245..6284a707 100644 --- a/.github/workflows/latest.yml +++ b/.github/workflows/latest.yml @@ -90,7 +90,7 @@ jobs: id: publish_latest uses: bmlt-enabled/wordpress-releases-github-action@v1.3 with: - file: artifacts/${ARTIFACT_FILENAME} + file: artifacts/${{ env.ARTIFACT_FILENAME }} s3_key: bmlt-workflow aws_account_id: ${{ secrets.AWS_ACCOUNT_ID }} From fbdf9aa658f657716e8eb95b0d8fcee434f004ef Mon Sep 17 00:00:00 2001 From: Patrick Joyce Date: Sat, 14 Sep 2024 10:15:32 -0400 Subject: [PATCH 3/7] Rm prefix --- .github/workflows/latest.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/latest.yml b/.github/workflows/latest.yml index 6284a707..ae0ffc87 100644 --- a/.github/workflows/latest.yml +++ b/.github/workflows/latest.yml @@ -65,7 +65,7 @@ jobs: export ARTIFACT_FILE=bmlt-workflow-${GITHUB_RUN_NUMBER}-${GITHUB_SHA} export ARTIFACT_FILENAME=${ARTIFACT_FILE}.zip echo "ARTIFACT_FILENAME=${ARTIFACT_FILENAME}" >> $GITHUB_ENV - git archive --format=zip --output=${ARTIFACT_FILENAME} --prefix=${ARTIFACT_FILE}/ HEAD + git archive --format=zip --output=${ARTIFACT_FILENAME} HEAD unzip ${ARTIFACT_FILENAME} rm ${ARTIFACT_FILENAME} echo ${GITHUB_SHA} > ${ARTIFACT_FILE}/build.txt From f2b4ecde38e34006fcd21e914670a1b43a9d361f Mon Sep 17 00:00:00 2001 From: Patrick Joyce Date: Sat, 14 Sep 2024 10:22:04 -0400 Subject: [PATCH 4/7] update gitattributes export ignores --- .gitattributes | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/.gitattributes b/.gitattributes index 838f21ac..f7b936fb 100644 --- a/.gitattributes +++ b/.gitattributes @@ -6,3 +6,9 @@ docker-compose.yml export-ignore Dockerfile export-ignore /.github export-ignore /tests export-ignore +.eslintrc.js export-ignore +.testcaferc.js export-ignore +config_phpunit.php export-ignore +jsconfig.json export-ignore +phpunit.xml.bak export-ignore +.gitattributes export-ignore From 59e9529ac82af9e5aefb2d28255d07d23331e2d7 Mon Sep 17 00:00:00 2001 From: Patrick Joyce Date: Sat, 14 Sep 2024 10:22:41 -0400 Subject: [PATCH 5/7] update gitattributes export ignores --- .gitattributes | 1 + 1 file changed, 1 insertion(+) diff --git a/.gitattributes b/.gitattributes index f7b936fb..2e1f5527 100644 --- a/.gitattributes +++ b/.gitattributes @@ -12,3 +12,4 @@ config_phpunit.php export-ignore jsconfig.json export-ignore phpunit.xml.bak export-ignore .gitattributes export-ignore +.gitignore export-ignore From 8574bfca5b8c9b2c15cf39263d5778e97e17ec6b Mon Sep 17 00:00:00 2001 From: Patrick Joyce Date: Sat, 14 Sep 2024 10:28:48 -0400 Subject: [PATCH 6/7] Add build sha --- .github/workflows/latest.yml | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/.github/workflows/latest.yml b/.github/workflows/latest.yml index ae0ffc87..130db8b9 100644 --- a/.github/workflows/latest.yml +++ b/.github/workflows/latest.yml @@ -66,12 +66,8 @@ jobs: export ARTIFACT_FILENAME=${ARTIFACT_FILE}.zip echo "ARTIFACT_FILENAME=${ARTIFACT_FILENAME}" >> $GITHUB_ENV git archive --format=zip --output=${ARTIFACT_FILENAME} HEAD - unzip ${ARTIFACT_FILENAME} - rm ${ARTIFACT_FILENAME} - echo ${GITHUB_SHA} > ${ARTIFACT_FILE}/build.txt - find ./${ARTIFACT_FILE} -type d | xargs chmod 755 - find ./${ARTIFACT_FILE} -name '*.php' | xargs chmod 644 - zip -r -9 ${ARTIFACT_FILENAME} ${ARTIFACT_FILE} + echo ${GITHUB_SHA} > build.txt + zip ${ARTIFACT_FILENAME} build.txt mkdir artifacts/ mv ${ARTIFACT_FILENAME} artifacts/ From 6305efb055991c027b5d8b6e8a04c70713ea51b1 Mon Sep 17 00:00:00 2001 From: Patrick Joyce Date: Sat, 14 Sep 2024 10:30:42 -0400 Subject: [PATCH 7/7] Add docker to export ignore --- .gitattributes | 1 + 1 file changed, 1 insertion(+) diff --git a/.gitattributes b/.gitattributes index 2e1f5527..336e3b48 100644 --- a/.gitattributes +++ b/.gitattributes @@ -6,6 +6,7 @@ docker-compose.yml export-ignore Dockerfile export-ignore /.github export-ignore /tests export-ignore +/docker export-ignore .eslintrc.js export-ignore .testcaferc.js export-ignore config_phpunit.php export-ignore