Skip to content

Commit

Permalink
Merge pull request #525 from Adyen/automation/release
Browse files Browse the repository at this point in the history
Release v15.0.0
  • Loading branch information
jillingk authored Aug 8, 2023
2 parents d38ce4f + 967277f commit 7c88d9d
Show file tree
Hide file tree
Showing 402 changed files with 87,242 additions and 2,236 deletions.
2 changes: 1 addition & 1 deletion .github/CODEOWNERS
Validating CODEOWNERS rules …
Original file line number Diff line number Diff line change
@@ -1 +1 @@
* @AlexandrosMor @acampos1916 @peterojo @rikterbeek @morerice @michaelpaul @candemiralp @RokPopov
* @Adyen/integration-tools-testing
8 changes: 0 additions & 8 deletions .github/dependabot.yml

This file was deleted.

16 changes: 16 additions & 0 deletions .github/workflows/gh_release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
name: Github Release

on:
workflow_dispatch:
push:
branches:
- main

jobs:
gh_release:
permissions:
contents: write
uses: Adyen/adyen-node-api-library/.github/workflows/lib-gh-release.yml@develop
with:
project-name: PHP
secrets: inherit
7 changes: 4 additions & 3 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
@@ -1,21 +1,22 @@
on: ["push", "pull_request"]
name: Main Workflow

on: ["pull_request"]

jobs:
run:
name: Run
runs-on: ubuntu-latest

strategy:
matrix:
php-version: [ 7.3, 7.4, 8.0, 8.1, 8.2 ]
php-version: [ 7.3, 8.2 ]

steps:
- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: ${{ matrix.php-version }}
tools: composer:v1
tools: composer:v2

- name: Checkout
uses: actions/checkout@v3
Expand Down
23 changes: 23 additions & 0 deletions .github/workflows/release_request.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
name: Release request

on:
workflow_dispatch:
inputs:
prerelease:
required: false
type: boolean
default: false
description: "This release will be labeled as non-production ready"
push:
branches:
- develop

jobs:
release:
permissions:
contents: write
pull-requests: write
uses: Adyen/adyen-node-api-library/.github/workflows/lib-release.yml@develop
with:
prerelease: ${{ inputs.prerelease || false }}
secrets: inherit
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ Thumbs.db
/.vscode/
/.vagrant/
/.idea/
Vagrantfile

# Packages
/vendor/
Expand Down
24 changes: 18 additions & 6 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ openapi-generator-jar:=target/openapi-generator-cli.jar
openapi-generator-cli:=java -jar $(openapi-generator-jar)

generator:=php
modelGen:=BalanceControl BalancePlatform Checkout StoredValue Payments Payout Management LegalEntityManagement Transfers BinLookup StoredValue POSTerminalManagement Recurring
modelGen:=BalanceControl BalancePlatform Checkout ConfigurationWebhooks StoredValue Payments Payout Management LegalEntityManagement TransferWebhooks Transfers BinLookup StoredValue POSTerminalManagement Recurring ReportWebhooks
models:=src/Adyen/Model
output:=target/out

Expand All @@ -24,6 +24,10 @@ Payout: spec=PayoutService-v68
Management: spec=ManagementService-v1
LegalEntityManagement: spec=LegalEntityService-v3
Transfers: spec=TransferService-v3
# BalanceWebhooks
ConfigurationWebhooks: spec=BalancePlatformConfigurationNotification-v1
ReportWebhooks: spec=BalancePlatformReportNotification-v1
TransferWebhooks: spec=BalancePlatformTransferNotification-v3

# Classic Platforms
marketpay/account: spec=AccountService-v6
Expand All @@ -39,7 +43,7 @@ $(modelGen): target/spec $(openapi-generator-jar)
-g $(generator) \
-o $(output) \
-t ./templates \
--inline-schema-name-mappings PaymentDonationRequest_paymentMethod=CheckoutPaymentMethod \
--inline-schema-name-mappings DonationPaymentRequest_paymentMethod=CheckoutPaymentMethod \
--model-package Model\\$@ \
--api-package Service\\$@ \
--reserved-words-mappings configuration=configuration \
Expand All @@ -65,7 +69,7 @@ $(Services): target/spec $(openapi-generator-jar)
-g $(generator) \
-o $(output) \
-t ./templates \
--inline-schema-name-mappings PaymentDonationRequest_paymentMethod=CheckoutPaymentMethod \
--inline-schema-name-mappings DonationPaymentRequest_paymentMethod=CheckoutPaymentMethod \
--model-package Model\\$@ \
--api-package Service\\$@ \
--inline-schema-name-mappings BankAccountInfo_accountIdentification=BankAccount \
Expand All @@ -89,7 +93,7 @@ $(SingleFileServices): target/spec $(openapi-generator-jar)
-c templates/config.yaml \
--model-package Model\\$@ \
--api-package Service\\$@ \
--inline-schema-name-mappings PaymentDonationRequest_paymentMethod=CheckoutPaymentMethod \
--inline-schema-name-mappings DonationPaymentRequest_paymentMethod=CheckoutPaymentMethod \
--reserved-words-mappings configuration=configuration \
--skip-validate-spec \
--additional-properties variableNamingConvention=camelCase \
Expand All @@ -99,7 +103,7 @@ $(SingleFileServices): target/spec $(openapi-generator-jar)
rm -rf src/Adyen/Service/$@Api src/Adyen/Model/$@
mv $(output)/lib/Model/$@ $(models)/$@
mv $(output)/lib/ObjectSerializer.php $(models)/$@
mv $(output)/lib/Service/$@/GeneralApiSingle.php src/Adyen/Service/$@Api.php
mv $(output)/lib/Service/$@/*ApiSingle.php src/Adyen/Service/$@Api.php

# Checkout spec (and patch version)
target/spec:
Expand All @@ -124,4 +128,12 @@ clean:
git clean -f -d $(models)


.PHONY: templates models $(services)
## Releases

version:
perl -lne 'print "currentVersion=$$1" if /LIB_VERSION = "(.+)";/' < src/Adyen/Client.php >> "$$GITHUB_OUTPUT"

bump:
perl -i -pe 's/$$ENV{"CURRENT_VERSION"}/$$ENV{"NEXT_VERSION"}/' src/Adyen/Client.php

.PHONY: templates models $(services) version bump
Loading

0 comments on commit 7c88d9d

Please sign in to comment.