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

Merge develop into poc/upe instances multiplied #5082

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
131 commits
Select commit Hold shift + click to select a range
ce1067c
Update WC Pay
Oct 3, 2022
380fd62
update package.json
Oct 7, 2022
5a48d94
Revert "update package.json"
kalessil Oct 12, 2022
7c76780
Revert "Update WC Pay"
kalessil Oct 12, 2022
236b854
Fix otp modal when auto redirecting to platform checkout (#4859)
Mayisha Oct 12, 2022
0ee6d64
Add authorizations-related endpoints (#4775)
elazzabi Oct 12, 2022
9939ddb
Add KYC additional info modal and notice banner (#4928)
dmallory42 Oct 14, 2022
bc1ea68
Add HMR and split webpack configuration (#4510)
ismaeldcom Oct 14, 2022
f1a9cc9
Save tokens for Link payment method (#4781)
dpaun1985 Oct 14, 2022
c2b4539
Fix platform checkout store logo preview (#4814)
Mayisha Oct 14, 2022
437e26d
Declare HPOS incompatibility (#4921)
jessy-p Oct 15, 2022
770b349
Add new GitHub workflows to manage pre-release and release packages (…
jbordonado Oct 19, 2022
bd4494d
Fix regex to check format of tag for a pre-release (#4947)
jbordonado Oct 19, 2022
8184f43
Pass the "Display prices during cart and checkout" option to WooPay (…
a-danae Oct 19, 2022
46c8ed8
Create an inbox note for Stripe Link set-up (#4932)
mordeth Oct 20, 2022
fcdc8ad
Revert "Support Platform Checkout from Checkout Blocks (#4611)"
zmaglica Oct 20, 2022
63eb790
Added changelog entries
zmaglica Oct 20, 2022
90974fe
Merge release/4.9.0 into trunk
zmaglica Oct 20, 2022
eb7118d
Product version bump update
zmaglica Oct 20, 2022
1ccf255
Merge trunk v4.9.0 into develop
zmaglica Oct 20, 2022
de82c8f
Adding manual option to deposit schedule selection (#4715)
brucealdridge Oct 20, 2022
e8bc55a
Add dependabot.yml to enable automatic creation of PRs (#4969)
jessepearson Oct 21, 2022
b8e916b
Add event when skipped the platform checkout (#4944)
hsingyuc Oct 21, 2022
9e540af
Switch to `@woocommerce/dependency-extraction-webpack-plugin` (#4281)
ismaeldcom Oct 24, 2022
b770d40
Drop IE11 support (#4948)
ismaeldcom Oct 24, 2022
82dca89
Adjust texts and links in WC admin express checkout section (#4852)
dpaun1985 Oct 24, 2022
7e300de
add link payment method for capture later option (#4822)
dpaun1985 Oct 24, 2022
74cf010
Remove unnecessary babel plugins (#4952)
ismaeldcom Oct 24, 2022
a518b80
Use individual Gridicons imports (#4967)
ismaeldcom Oct 24, 2022
55cb8ce
Update lodash to version 4.17.21 (#4963)
jessepearson Oct 25, 2022
459d6a2
Update some workflow files to use an env variable for L-2 versions (#…
jbordonado Oct 26, 2022
375f183
Update husky to v 8.0.1 (#4941)
jessepearson Oct 26, 2022
06eb034
Refactor WC_Payment_Gateway_WCPay Part 1 (#4850)
leonardola Oct 26, 2022
a0115c8
fixed deprecated version
leonardola Oct 26, 2022
de6872c
fixed deprecated version warning
leonardola Oct 26, 2022
643e9d3
Add platform checkout signature endpoint (#4927)
bborman22 Oct 26, 2022
cfb1640
Update `woocommerce-payments` package version number in `package-lock…
aprea Oct 27, 2022
8fcfff9
Hide upload buttons, amend placeholders in submitted evidence form (#…
nagpai Oct 27, 2022
44a829b
Update subscriptions-core version 2.4.0 (#5009)
mattallan Oct 28, 2022
6ddd271
Add filter to record wcpay server api response time (#5001)
hsingyuc Oct 30, 2022
27c115b
Prevent auto redirection for different customer (#4890)
Mayisha Oct 31, 2022
e565ed6
Update priority for Multi-Currency filters for prices and currency (#…
jessepearson Oct 31, 2022
b646c2e
Update deprecated interpolate-components to new @automattic/interpola…
jessepearson Oct 31, 2022
70f4d06
Add dependencies.md to replace renovate.md (#5013)
jessepearson Oct 31, 2022
44d0ae8
Add woopay express checkout feature flag (#5014)
bborman22 Oct 31, 2022
facbc1c
Update the balance component header (#5029)
aprea Nov 1, 2022
cc46939
Authorizations: Replace mocked data in reducer/store with actual fetc…
elazzabi Nov 1, 2022
0634682
Update Stripe Link inbox notification wording (#5030)
mordeth Nov 1, 2022
7b36b2d
Add watch mode to php unit tests (#4935)
eduardoumpierre Nov 1, 2022
3dd2721
Fix error that would happen when visiting the plugins page (#5034)
leonardola Nov 1, 2022
523896e
Prevent proceeding to WooPay's checkout on previews (#5016)
a-danae Nov 1, 2022
76d86d3
Fix currency switcher block padding (#5011)
ismaeldcom Nov 2, 2022
15a69bf
Removing merge left-overs
RadoslavGeorgiev Nov 2, 2022
9c1ce77
Merge fix 2
RadoslavGeorgiev Nov 2, 2022
a9435b0
Fix tests for WP 6.1 (#5049)
RadoslavGeorgiev Nov 3, 2022
680a103
New Tracks event on KYC modal open (#5004)
dmallory42 Nov 3, 2022
d07ba65
Update Dockerfile image to wordpress:php7.4 (#4943)
allie500 Nov 3, 2022
a3e9e0f
Update Subscriptions Core composer package to 2.4.1 (#5036)
mattallan Nov 4, 2022
7b60cb9
Replace the deprecated wcs_renewal_order_meta_query with a new hook (…
james-allan Nov 4, 2022
74abe7f
Update Subscriptions Core to 2.5.1 (#5053)
mattallan Nov 4, 2022
71628af
Add new workflow for post-release updates (#5003)
jbordonado Nov 4, 2022
4966f72
Revert "Adding manual option to deposit schedule selection (#4715)" (…
aprea Nov 4, 2022
85297bf
[Authorizations] Wire Uncaptured Transactions screen to API data (#4982)
elazzabi Nov 4, 2022
1eff430
[Authorizations] [Integration] Capture authorizations from table (#4962)
mgascam Nov 4, 2022
b66af09
Add Capture Charge button on payment details page (#5006)
mgascam Nov 4, 2022
b33be3a
Refund Confirmation modal on order status change (#4987)
jessy-p Nov 4, 2022
b1de40f
Fix jest tests due to daylight saving (#5065)
shendy-a8c Nov 8, 2022
ff3a6f8
Fetch authorization data only if the payment is marked for manual cap…
mgascam Nov 8, 2022
38a2936
Add uncaptured transactions count badge to Transactions menu (#5046)
anu-rock Nov 8, 2022
ebf35bd
Add PHPCS object operator indent rule (#5055)
ismaeldcom Nov 8, 2022
bfaf246
Write changelog.
shendy-a8c Nov 9, 2022
c5f0dfb
Release/5.0.0 (#5077)
shendy-a8c Nov 9, 2022
9dc3db2
Revert "Release/5.0.0 (#5077)" (#5080)
shendy-a8c Nov 9, 2022
81a735a
Merge release/5.0.0 into trunk
shendy-a8c Nov 9, 2022
ab029f5
Product version bump update
shendy-a8c Nov 9, 2022
69b7049
Merge trunk v5.0.0 into develop
shendy-a8c Nov 9, 2022
5d5e614
Clean up some workflows for the release automation (#5070)
jbordonado Nov 9, 2022
fd12001
Remove pull request push trigger from zip file workflow (#5086)
jbordonado Nov 9, 2022
3d214f6
Send merchant's setting for `ship_to_billing_address_only` to platfor…
Mayisha Nov 9, 2022
0557750
Add description for capture authorization endpoint docs (#5087)
anu-rock Nov 9, 2022
78a22e5
Fix section divider in Authentication API docs (#5091)
anu-rock Nov 10, 2022
db1cb35
Add API docs for authorization endpoints (#5088)
anu-rock Nov 10, 2022
5587392
Support new platform checkout user from checkout blocks (#4638)
Mayisha Nov 10, 2022
306dcae
Merge branch 'develop' of https://github.com/Automattic/woocommerce-p…
Nov 10, 2022
bcb1196
Provide minor post-conflicts fixes and ensure that Blocks checkout wo…
Nov 10, 2022
6a3db47
Update margin to fix cropping of search field for Multi-Currency curr…
jessepearson Nov 10, 2022
c38ddf2
Make the legacy card gateway work on the classic checkout
Nov 10, 2022
e7f70e7
Check if user can `manage_woocommerce` in maybe_redirect_to_onboardin…
shendy-a8c Nov 10, 2022
0e0c835
Changelog entries for 5.0.1.
shendy-a8c Nov 10, 2022
5f3cc43
Merge release/5.0.1 into trunk
shendy-a8c Nov 10, 2022
0840871
Product version bump update
shendy-a8c Nov 10, 2022
2c2ac79
Merge trunk v5.0.1 into develop
shendy-a8c Nov 10, 2022
f81685d
Show uncaptured transactions tab only when some criteria is met (#5072)
elazzabi Nov 10, 2022
5a41ddc
Add the missing include for authorization API docs in sidebar (#5097)
anu-rock Nov 10, 2022
79fe292
Add count of pending authorizations to Uncaptured tab (#5095)
mgascam Nov 10, 2022
aa77faf
Update copy of warning modal (#5103)
nagpai Nov 11, 2022
850f2d4
Adjust the checkout and fix the wcpay-upe-element element delivery to…
Nov 11, 2022
c709262
Expose fraud prevention token, send it to blocks checkout (#5104)
tpaksu Nov 11, 2022
f352737
Provide payment gateway as the callback parameter
Nov 11, 2022
157a9e5
Merge branch 'develop' of https://github.com/Automattic/woocommerce-p…
Nov 11, 2022
13e2384
Merge branch 'poc/upe-instances-multiplied' of https://github.com/Aut…
Nov 11, 2022
ff0b696
Remove Platform Checkout Test Site Sync yml file. (#5054)
tommyshellberg Nov 11, 2022
b138c2c
Merge branch 'develop' of https://github.com/Automattic/woocommerce-p…
Nov 11, 2022
672adb9
Fix post-merge tests failures - part I
Nov 11, 2022
3813235
Extend the token service with LINK support
Nov 11, 2022
c84178e
Fix post-merge tests failures - part II
Nov 11, 2022
d9db42b
Fix the "Learn More" link on Express Checkout settings section (#5105)
nagpai Nov 12, 2022
f312c02
Update subscriptions core version to 5.0.0 (#5120)
brucealdridge Nov 14, 2022
c2d67f1
Decrease the complexity of initializing both legacy and UPE checkouts
Nov 14, 2022
15f08c7
Provide gateway to the UPE checkout
Nov 14, 2022
4a4d03c
Fix post-merge tests failures - part III
Nov 14, 2022
7115db4
Merge branch 'develop' of https://github.com/Automattic/woocommerce-p…
Nov 14, 2022
a9051ed
Fixed fatal error when calling the payment_gateways api endpoint (#5108)
leonardola Nov 14, 2022
2778dfe
Changelog for 5.0.2.
shendy-a8c Nov 14, 2022
e0bb408
Merge release/5.0.2 into trunk
shendy-a8c Nov 14, 2022
de8cdd7
Product version bump update
shendy-a8c Nov 14, 2022
74790b4
Merge trunk v5.0.2 into develop
shendy-a8c Nov 14, 2022
3d9589d
fixed bug that would not allow customers using firefox to be redirect…
leonardola Nov 14, 2022
0b4bfc0
Fixes purchasing a synced subscription with WCPay Subscriptions resul…
mattallan Nov 15, 2022
b188335
Changelog entries for 5.0.3.
shendy-a8c Nov 15, 2022
b29b506
Merge release/5.0.3 into trunk
shendy-a8c Nov 15, 2022
168b6d0
Product version bump update
shendy-a8c Nov 15, 2022
47e7692
Merge trunk v5.0.3 into develop
shendy-a8c Nov 15, 2022
829ed87
Prevent the double-zip issue when downloading from zip file workflow …
jbordonado Nov 15, 2022
6621a7e
Remove useless collections and variables after the PR review
Nov 15, 2022
6a483e2
Merge branch 'develop' of https://github.com/Automattic/woocommerce-p…
Nov 15, 2022
80867bc
fixed problem that would not close the redirect iframe after clicking…
leonardola Nov 15, 2022
472fd4f
Poc/add woopay express checkout button (#5059)
brettshumaker Nov 15, 2022
a4222e7
Fix the failing test for UPE gateway
Nov 16, 2022
1bebfee
Fix card payment gateway hiding on the admin page
Nov 16, 2022
7beab2a
Merge branch 'develop' of https://github.com/Automattic/woocommerce-p…
Nov 16, 2022
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
5 changes: 0 additions & 5 deletions .babelrc

This file was deleted.

9 changes: 8 additions & 1 deletion .eslintrc
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,14 @@
"jest/no-deprecated-functions": "off",
"no-alert": "off",
"object-shorthand": "off",
"no-multi-str": "off"
"no-multi-str": "off",
"no-restricted-syntax": [
"error",
{
"selector": "ImportDeclaration[source.value=/gridicons(?!\\u002F)/]",
"message": "Do not import whole Gridicons, import them individually with 'gridicons/dist/icon-name'."
}
]
},
"overrides": [
{
Expand Down
26 changes: 26 additions & 0 deletions .github/actions/build/action.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
name: "Build WooCommerce Payments"
description: "Build WooCommerce Payments"

outputs:
release-filename:
description: "The name of the release filename"
value: ${{ steps.build_plugin.outputs.RELEASE_FILENAME }}

runs:
using: composite
steps:
- name: "Build the plugin"
id: build_plugin
shell: bash
env:
RELEASE_FILENAME: "woocommerce-payments.zip"
run: |
npm ci
npm run build

if [[ ! -f $RELEASE_FILENAME ]]; then
echo "::error::Failed to create release archive $RELEASE_FILENAME."
exit 1
fi

echo "RELEASE_FILENAME=$RELEASE_FILENAME" >> $GITHUB_OUTPUT
48 changes: 48 additions & 0 deletions .github/actions/create-branch/action.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
name: "Create a branch"
description: "Create a branch if the format is correct"

inputs:
version:
description: "The version that the action should use to create the branch (e.g. 4.5.0 or 4.5.0-test-2)"
required: true
is-pre-release:
description: "Whether the action runs in the context of a pre-release (default: true)"
required: true
default: "true"

outputs:
trimmed-version:
description: "The trimmed version"
value: ${{ steps.version_format_check.outputs.trimmed-version }}
branch-name:
description: "The name of the branch created"
value: ${{ steps.create_branch.outputs.BRANCH_NAME }}

runs:
using: composite
steps:
- name: "Check the format of the version provide"
id: version_format_check
uses: ./.github/actions/version-check
with:
version: ${{ inputs.version }}
is-pre-release: ${{ inputs.is-pre-release }}

- name: "Create a branch"
id: create_branch
shell: bash
env:
IS_PRERELEASE: ${{ inputs.is-pre-release }}
VERSION: ${{ steps.version_format_check.outputs.trimmed-version }}
run: |
if ${{ env.IS_PRERELEASE == 'true' }}; then
BRANCH_NAME="testing/$VERSION"
echo "Created branch $BRANCH_NAME." >> $GITHUB_STEP_SUMMARY
else
BRANCH_NAME="release/$VERSION"
echo ":rocket: Created branch $BRANCH_NAME. :rocket:" >> $GITHUB_STEP_SUMMARY
fi

git checkout -b $BRANCH_NAME
git push origin $BRANCH_NAME
echo "BRANCH_NAME=$BRANCH_NAME" >> $GITHUB_OUTPUT
50 changes: 50 additions & 0 deletions .github/actions/create-tag/action.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
name: "Create a tag"
description: "Create a tag if the format is correct"

inputs:
version:
description: "The version that the action should use to create the tag (e.g. 4.5.0 or 4.5.0-test-2)"
required: true
is-pre-release:
description: "Whether the action runs in the context of a pre-release (default: true)"
required: true
default: "true"

outputs:
trimmed-version:
description: "The trimmed version"
value: ${{ steps.version_format_check.outputs.trimmed-version }}
tag-message:
description: "The tagging message"
value: ${{ steps.create_tag.outputs.TAG_MESSAGE }}

runs:
using: composite
steps:
- name: "Check the format of the version"
id: version_format_check
uses: ./.github/actions/version-check
with:
version: ${{ inputs.version }}
is-pre-release: ${{ inputs.is-pre-release }}

- name: "Create a tag"
id: create_tag
shell: bash
env:
IS_PRERELEASE: ${{ inputs.is-pre-release }}
VERSION: ${{ steps.version_format_check.outputs.trimmed-version }}
run: |
if ${{ env.IS_PRERELEASE == 'true' }}; then
TAG_MESSAGE="Version for testing $VERSION. Not for Production"
echo "Created tag $VERSION." >> $GITHUB_STEP_SUMMARY
else
TAG_MESSAGE="Version $VERSION"
echo ":rocket: Created tag $VERSION. :rocket:" >> $GITHUB_STEP_SUMMARY
fi

git config user.name "${{ github.actor }}"
git config user.email "${{ github.actor }}@users.noreply.github.com"
git tag -a -m "$TAG_MESSAGE" $VERSION
git push origin $VERSION
echo "TAG_MESSAGE=$TAG_MESSAGE" >> $GITHUB_OUTPUT
40 changes: 40 additions & 0 deletions .github/actions/generate-changelog/action.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
name: "Generate the changelog for WooCommerce Payments"
description: "Generate the changelog from the version provided"

inputs:
release-version:
description: "The release version for which the action should generate the changelog (e.g. 4.5.0)"
required: true
release-date:
description: "The release date (format: YYYY-MM-DD) for which the action should generate the changelog (default: unreleased)"
required: false
default: "unreleased"

outputs:
changelog:
description: "The escaped changelog content generated from the release version provided"
value: ${{ steps.get_changelog.outputs.CHANGELOG }}

runs:
using: composite
steps:
- name: "Generate changelog"
id: get_changelog
shell: bash
env:
VERSION: ${{ inputs.release-version }}
RELEASE_DATE: ${{ inputs.release-date }}
run: |
# Install this dev package globally to gather changelog entries while not including it into the release package
composer global require automattic/jetpack-changelogger:^3.0.7

# Gather changelog entries
~/.composer/vendor/bin/changelogger write --use-version="$VERSION" --release-date="$RELEASE_DATE"

echo "Picking up changelog for version '$VERSION'..."
CHANGELOG=$(awk '/^= / { if (p) { exit }; p=1; next } p && NF' changelog.txt)
echo "$CHANGELOG"

# New line characters need to be escaped because set-output doesn't support multi-line strings out of the box
CHANGELOG="${CHANGELOG//$'\n'/\\n}"
echo "CHANGELOG=$CHANGELOG" >> $GITHUB_OUTPUT
29 changes: 29 additions & 0 deletions .github/actions/setup-repo/action.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
name: "Setup WooCommerce Payments repository"
description: "Handles the installation, building, and caching of the projects within the repository."

inputs:
php-version:
description: "The version of PHP that the action should set up."
default: "7.4"

runs:
using: composite
steps:
- name: "Setup Node"
uses: actions/setup-node@v3
with:
node-version-file: '.nvmrc'
cache: 'npm'

- name: "Enable composer dependencies caching"
uses: actions/cache@v3
with:
path: ~/.cache/composer/
key: ${{ runner.os }}-composer-${{ hashFiles('composer.lock') }}

- name: "Setup PHP"
uses: shivammathur/setup-php@v2
with:
php-version: ${{ inputs.php-version }}
tools: composer
coverage: none
33 changes: 33 additions & 0 deletions .github/actions/trigger-translations/action.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
name: "Trigger translations"
description: "Triggers translations update on GlotPress."

inputs:
release-version:
description: "The release version (e.g. 4.5.0)."
required: true
glotpress-url:
description: "The GlotPress import URL to use."
required: true

runs:
using: composite
steps:
- name: "Request the translations update"
env:
GLOTPRESS_IMPORT_URL: ${{ inputs.glotpress-url }}
VERSION: ${{ inputs.release-version }}
shell: bash
run: |
CURL_RESPONSE=$(curl --request POST \
--url "$GLOTPRESS_IMPORT_URL/$VERSION" \
--silent \
--write-out "\n%{http_code}\n" )
HTTP_CODE=$(echo "$CURL_RESPONSE" | tail -n 1)
CURL_RESPONSE=$(echo "$CURL_RESPONSE" | head -n -1)

if [[ ${HTTP_CODE} -lt 200 || ${HTTP_CODE} -gt 299 ]]; then
echo "$CURL_RESPONSE"
echo "::error::Couldn't trigger translations."
exit 1
fi
echo "Translations update triggered."
42 changes: 42 additions & 0 deletions .github/actions/version-check/action.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
name: "Check the format of a version"
description: "Checks the format of a version, whether that is a pre-release or release context"

inputs:
version:
description: "The version that the action should check (e.g. 4.5.0 or 4.5.0-test-2)"
required: true
is-pre-release:
description: "Whether the action runs in the context of a pre-release (default: true)"
required: true
default: "true"

outputs:
trimmed-version:
description: "The trimmed version"
value: ${{ steps.version_format_check.outputs.VERSION }}

runs:
using: composite
steps:
- name: "Check the format of the version"
id: version_format_check
shell: bash
env:
IS_PRERELEASE: ${{ inputs.is-pre-release }}
VERSION: ${{ inputs.version }}
run: |
# Trim leading and ending whitespaces
TRIMMED_VERSION=$(echo "$VERSION" | xargs)

if ${{ env.IS_PRERELEASE == 'true' }}; then
VERSION_FORMAT="^[0-9]\.[0-9]\.[0-9]-test-[1-9]$"
else
VERSION_FORMAT="^[0-9]\.[0-9]\.[0-9]$"
fi

if [[ $TRIMMED_VERSION =~ $VERSION_FORMAT ]]; then
echo "VERSION=$TRIMMED_VERSION" >> $GITHUB_OUTPUT
else
echo "::error::The version provided doesn't respect the format expected (version: $TRIMMED_VERSION; format: $VERSION_FORMAT)."
exit 1
fi
34 changes: 34 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
version: 2
updates:
# Enable version updates for npm
- package-ecosystem: 'npm'
# Look for `package.json` and `lock` files in the `root` directory
directory: '/'
# Check the npm registry for updates every day (weekdays)
schedule:
interval: 'daily'
# Reviewers for issues created
reviewers:
- 'jessepearson'

# Enable version updates for composer
- package-ecosystem: 'composer'
# Look for `package.json` and `lock` files in the `root` directory
directory: '/'
# Check the npm registry for updates every day (weekdays)
schedule:
interval: 'daily'
# Reviewers for issues created
reviewers:
- 'jessepearson'

# Enable version updates for Docker
- package-ecosystem: 'docker'
# Look for a `Dockerfile` in the `root` directory
directory: '/'
# Check for updates once a week
schedule:
interval: 'weekly'
# Reviewers for issues created
reviewers:
- 'jessepearson'
34 changes: 34 additions & 0 deletions .github/workflows/build-zip-file.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
name: "Build zip file"

# This action will run when it is triggered manually.
on:
workflow_dispatch:

jobs:
build-zip:
name: "Build the zip file"
runs-on: ubuntu-20.04
steps:
- name: "Checkout repository"
uses: actions/checkout@v3

- name: "Set up repository"
uses: ./.github/actions/setup-repo

- name: "Build the plugin"
id: build_plugin
uses: ./.github/actions/build

- name: "Unzip the file (prevents double zip issue)"
run: |
echo ":information_source: Unzipping to a folder to prevent double-zip issue ([known limitation](https://github.com/actions/upload-artifact#zipped-artifact-downloads)). Increase in artifact size is expected since we're uploading the folder." >> $GITHUB_STEP_SUMMARY
unzip ${{ steps.build_plugin.outputs.release-filename }} -d zipfile

- name: "Upload the zip file as an artifact"
uses: actions/upload-artifact@v3
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
name: "woocommerce-payments"
path: zipfile
retention-days: 7
Loading