diff --git a/.gitattributes b/.gitattributes index 838f21ac..336e3b48 100644 --- a/.gitattributes +++ b/.gitattributes @@ -6,3 +6,11 @@ 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 +jsconfig.json export-ignore +phpunit.xml.bak export-ignore +.gitattributes export-ignore +.gitignore export-ignore diff --git a/.github/workflows/latest.yml b/.github/workflows/latest.yml index 726188ce..130db8b9 100644 --- a/.github/workflows/latest.yml +++ b/.github/workflows/latest.yml @@ -65,13 +65,9 @@ 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 - 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} + git archive --format=zip --output=${ARTIFACT_FILENAME} HEAD + echo ${GITHUB_SHA} > build.txt + zip ${ARTIFACT_FILENAME} build.txt mkdir artifacts/ mv ${ARTIFACT_FILENAME} artifacts/ @@ -86,6 +82,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/${{ env.ARTIFACT_FILENAME }} + s3_key: bmlt-workflow + aws_account_id: ${{ secrets.AWS_ACCOUNT_ID }} + - uses: act10ns/slack@v1 with: status: ${{ job.status }}