diff --git a/.github/workflows/zip.yml b/.github/workflows/zip.yml index 210fb24..82c19e7 100644 --- a/.github/workflows/zip.yml +++ b/.github/workflows/zip.yml @@ -100,7 +100,7 @@ jobs: with: node-version-file: '.nvmrc' cache: 'npm' - + - name: Set up authentication for NODE_AUTH_TOKEN if present if: secrets.NODE_AUTH_TOKEN run: echo "//npm.pkg.github.com/:_authToken=\${{ secrets.NODE_AUTH_TOKEN }}" >> ~/.npmrc @@ -201,7 +201,7 @@ jobs: NODE_AUTH_TOKEN: ${{ secrets.NODE_AUTH_TOKEN }} - name: pup build with composer auth - if: steps.s3_zip_exists.outcome != 'success' && env.COMPOSER_TOKEN_AVAILABLE == 'true' + if: steps.s3_zip_exists.outcome != 'success' && env.COMPOSER_TOKEN_AVAILABLE == "true" env: COMPOSER_AUTH: '{"github-oauth": {"github.com": "${{ secrets.COMPOSER_TOKEN }}"}}' NODE_AUTH_TOKEN: ${{ secrets.NODE_AUTH_TOKEN }} @@ -220,47 +220,4 @@ jobs: run: composer -- pup i18n - name: pup package - id: pup_package - if: steps.s3_zip_exists.outcome != 'success' - run: composer -- pup package ${{ env.VERSION }} - - - name: Create the zip_files folder - if: steps.s3_zip_exists.outcome != 'success' - run: | - mkdir zip_files - cp ${{ env.ZIP_NAME }}.zip zip_files - - # ------------------------------------------------------------------------------ - # Store zip on s3 service. - # ------------------------------------------------------------------------------ - - name: Upload the zip to Wasabi - if: steps.s3_zip_exists.outcome != 'success' - uses: the-events-calendar/action-s3-utility@main - with: - args: --acl public-read --follow-symlinks - env: - S3_BUCKET: ${{ secrets.S3_BUCKET }} - S3_ACCESS_KEY_ID: ${{ secrets.S3_ACCESS_KEY_ID }} - S3_SECRET_ACCESS_KEY: ${{ secrets.S3_SECRET_ACCESS_KEY }} - S3_REGION: ${{ secrets.S3_REGION }} - S3_ENDPOINT: ${{ secrets.S3_ENDPOINT }} - COMMAND: sync - SOURCE_DIR: zip_files - - # ------------------------------------------------------------------------------ - # Send slack message. - # ------------------------------------------------------------------------------ - - name: Trigger Slack message - if: inputs.slack_channel && inputs.slack_thread - run: | - curl -X GET "https://utility.theeventscalendar.com/slack-message.php?channel=${{ inputs.slack_channel }}&thread=${{ inputs.slack_thread }}&file=${{ env.ZIP_NAME }}.zip&secret=${{ secrets.JENKINS_SECRET }}&url=https://github.com/${GITHUB_REPOSITORY}/actions/runs/${GITHUB_RUN_ID}" - - # ------------------------------------------------------------------------------ - # Upload the artifact if it is a workflow dispatch. - # ------------------------------------------------------------------------------ - - name: Upload plugin artifact - if: steps.pup_package.outcome == 'success' && github.event_name == 'workflow_dispatch' - uses: actions/upload-artifact@v3 - with: - name: ${{ env.ZIP_NAME }} - path: .pup-zip + id