various fixes and C sdk #86
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Generate SDKs | |
on: | |
push: | |
branches: ["main"] | |
workflow_dispatch: | |
jobs: | |
generate-js-client: | |
runs-on: ubuntu-latest | |
name: Generate js sdk | |
steps: | |
- name: Checkout OpenAPI | |
uses: actions/checkout@v3 | |
with: | |
persist-credentials: false | |
fetch-depth: 0 | |
- name: Generate JS sdk | |
uses: openapi-generators/openapitools-generator-action@v1 | |
with: | |
generator: javascript | |
openapi-file: openapi-3.0.yaml | |
command-args: --additional-properties=moduleName=dofusdude,projectName=dofusdude-js,licenseName=MIT | |
- name: Setup Node.js environment | |
uses: actions/[email protected] | |
with: | |
node-version: 16.x | |
- name: Generate package-lock.json | |
run: | | |
cp -r javascript-client javascript-client-cp | |
cd javascript-client-cp | |
npm i | |
cp package-lock.json ../javascript-client/package-lock.json | |
cd ../javascript-client | |
mkdir -p .github/workflows/ | |
printf '%s\n' 'name: Node.js CI' 'on:' ' push:' ' branches: [ "main" ]' ' pull_request:' ' branches: [ "main" ]' 'jobs:' ' build:' ' runs-on: ubuntu-latest' ' strategy:' ' matrix:' ' node-version: [14.x, 16.x, 18.x]' ' steps:' ' - uses: actions/checkout@v3' ' - name: Use Node.js ${{ matrix.node-version }}' ' uses: actions/setup-node@v3' ' with:' ' node-version: ${{ matrix.node-version }}' ' cache: npm' ' - run: npm ci' ' - run: npm run build --if-present' ' - run: npm test' '' > .github/workflows/testing.yml | |
printf '%s\n' 'name: Node.js Package' 'on:' ' release:' ' types: [created]' 'jobs:' ' build:' ' runs-on: ubuntu-latest' ' steps:' ' - uses: actions/checkout@v3' ' - uses: actions/setup-node@v3' ' with:' ' node-version: 16' ' - run: npm ci' ' - run: npm test' ' publish-npm:' ' needs: build' ' runs-on: ubuntu-latest' ' steps:' ' - uses: actions/checkout@v3' ' - uses: actions/setup-node@v3' ' with:' ' node-version: 16' ' registry-url: https://registry.npmjs.org/' ' - run: npm ci' ' - run: npm publish' ' env:' ' NODE_AUTH_TOKEN: secrets.NPM_TOKEN' > .github/workflows/publish.yml | |
sed -i 's/secrets.NPM_TOKEN/\$\{\{secrets.NPM_TOKEN\}\}/g' .github/workflows/publish.yml | |
sed -i 's/\\"/"/g' README.md | |
cd .. | |
- name: Pushes to another repository | |
uses: cpina/github-action-push-to-another-repository@main | |
env: | |
SSH_DEPLOY_KEY: ${{ secrets.SSH_DEPLOY_KEY }} | |
API_TOKEN_GITHUB: ${{ secrets.PUSH_GITHUB_TOKEN }} | |
with: | |
source-directory: "javascript-client" | |
destination-github-username: "dofusdude" | |
destination-repository-name: "dofusdude-js" | |
user-email: [email protected] | |
target-branch: main | |
generate-ts-client: | |
runs-on: ubuntu-latest | |
name: Generate ts sdk | |
steps: | |
- name: Checkout OpenAPI | |
uses: actions/checkout@v3 | |
with: | |
persist-credentials: false | |
fetch-depth: 0 | |
- name: Generate TS sdk | |
uses: openapi-generators/openapitools-generator-action@v1 | |
with: | |
generator: typescript-axios | |
openapi-file: openapi-3.0.yaml | |
command-args: --additional-properties=npmName=dofusdude-ts | |
- name: Setup Node.js environment | |
uses: actions/[email protected] | |
with: | |
node-version: 16.x | |
- name: Generate package-lock.json | |
run: | | |
cp -r typescript-axios-client typescript-axios-client-cp | |
cd typescript-axios-client-cp | |
npm i | |
cp package-lock.json ../typescript-axios-client/package-lock.json | |
cd ../typescript-axios-client | |
mkdir -p .github/workflows/ | |
printf '%s\n' 'name: Node.js CI' 'on:' ' push:' ' branches: [ "main" ]' ' pull_request:' ' branches: [ "main" ]' 'jobs:' ' build:' ' runs-on: ubuntu-latest' ' strategy:' ' matrix:' ' node-version: [14.x, 16.x, 18.x]' ' steps:' ' - uses: actions/checkout@v3' ' - name: Use Node.js ${{ matrix.node-version }}' ' uses: actions/setup-node@v3' ' with:' ' node-version: ${{ matrix.node-version }}' ' cache: npm' ' - run: npm ci' ' - run: npm run build --if-present' '' > .github/workflows/build.yml | |
printf '%s\n' 'name: Node.js Package' 'on:' ' release:' ' types: [created]' 'jobs:' ' build:' ' runs-on: ubuntu-latest' ' steps:' ' - uses: actions/checkout@v3' ' - uses: actions/setup-node@v3' ' with:' ' node-version: 16' ' - run: npm ci' ' publish-npm:' ' needs: build' ' runs-on: ubuntu-latest' ' steps:' ' - uses: actions/checkout@v3' ' - uses: actions/setup-node@v3' ' with:' ' node-version: 16' ' registry-url: https://registry.npmjs.org/' ' - run: npm ci' ' - run: npm publish' ' env:' ' NODE_AUTH_TOKEN: secrets.NPM_TOKEN' > .github/workflows/publish.yml | |
sed -i 's/secrets.NPM_TOKEN/\$\{\{secrets.NPM_TOKEN\}\}/g' .github/workflows/publish.yml | |
sed -i 's/\\"/"/g' README.md | |
cd .. | |
- name: Pushes to another repository | |
uses: cpina/github-action-push-to-another-repository@main | |
env: | |
SSH_DEPLOY_KEY: ${{ secrets.SSH_DEPLOY_KEY_TS }} | |
API_TOKEN_GITHUB: ${{ secrets.PUSH_GITHUB_TOKEN }} | |
with: | |
source-directory: "typescript-axios-client" | |
destination-github-username: "dofusdude" | |
destination-repository-name: "dofusdude-ts" | |
user-email: [email protected] | |
target-branch: main | |
generate-java-client: | |
runs-on: ubuntu-latest | |
name: Generate java sdk | |
steps: | |
- name: Checkout OpenAPI | |
uses: actions/checkout@v3 | |
with: | |
persist-credentials: false | |
fetch-depth: 0 | |
- name: Generate java sdk | |
uses: openapi-generators/openapitools-generator-action@v1 | |
with: | |
generator: java | |
openapi-file: openapi-3.0.yaml | |
command-args: --additional-properties=licenseName=GPLv3,licenseUrl=https://www.gnu.org/licenses/gpl-3.0.txt,scmDeveloperConnection=scm:git:[email protected]:dofusdude/dofusdude-java.git,scmConnection=scm:git:[email protected]:dofusdude/dofusdude-java.git,apiPackage=com.dofusdude.client.api,artifactDescription=dofusdude-client,artifactId=dofusdude-java,artifactUrl=https://github.com/dofusdude/dofusdude-java,[email protected],developerName=stelzo,developerOrganization=dofusdude,developerOrganizationUrl=https://github.com/dofusdude,invokerPackage=com.dofusdude.client,modelPackage=com.dofusdude.client.model,groupId=com.dofusdude,useJakartaEe=true | |
- name: Add actions and patch pom.xml | |
run: | | |
cd java-client | |
mkdir -p .github/workflows/ | |
printf '%s\n' 'name: Build' 'on:' ' push:' ' branches: [ main ]' ' pull_request:' ' branches: [ main ]' 'jobs:' ' build:' ' runs-on: ubuntu-latest' ' steps:' ' - uses: actions/checkout@v4' ' - name: Set up Java' ' uses: actions/setup-java@v4' ' with:' ' java-version: "17"' ' distribution: "temurin"' ' - name: Verify and test' ' run: mvn --batch-mode --update-snapshots verify && mvn test' > .github/workflows/build.yml | |
printf '%s\n' 'name: Upload Java Maven Package' 'on:' ' release:' ' types: [created]' 'jobs:' ' deploy:' ' runs-on: ubuntu-latest' ' permissions:' ' contents: read' ' packages: write' ' steps:' ' - uses: actions/checkout@v4' ' - name: Set up Java' ' uses: actions/setup-java@v4' ' with:' ' java-version: "17"' ' distribution: "temurin"' ' - name: Release Maven package' ' run: mvn --batch-mode deploy' ' env:' ' GITHUB_TOKEN: secrets.GITHUB_TOKEN' > .github/workflows/publish.yml | |
sed -i 's/secrets.GITHUB_TOKEN/\$\{\{secrets.GITHUB_TOKEN\}\}/g' .github/workflows/publish.yml | |
sed -i 's|</project>| <distributionManagement><repository><id>github</id><name>GitHub Packages</name><url>https://maven.pkg.github.com/dofusdude/dofusdude-java</url></repository></distributionManagement></project>|g' pom.xml | |
sed -i 's/\\"/"/g' README.md | |
cd .. | |
- name: Pushes to sdk repository | |
uses: cpina/github-action-push-to-another-repository@main | |
env: | |
SSH_DEPLOY_KEY: ${{ secrets.SSH_DEPLOY_KEY_JAVA }} | |
API_TOKEN_GITHUB: ${{ secrets.PUSH_GITHUB_TOKEN }} | |
with: | |
source-directory: "java-client" | |
destination-github-username: "dofusdude" | |
destination-repository-name: "dofusdude-java" | |
user-email: [email protected] | |
target-branch: main | |
generate-csharp-client: | |
runs-on: ubuntu-latest | |
name: Generate csharp sdk | |
steps: | |
- name: Checkout OpenAPI | |
uses: actions/checkout@v3 | |
with: | |
persist-credentials: false | |
fetch-depth: 0 | |
- name: OpenAPI API Version Print | |
uses: stelzo/openapi-api-version-print@v1 | |
id: api-version-print | |
with: | |
specFile: openapi-3.0.yaml | |
- name: Generate csharp sdk | |
uses: openapi-generators/openapitools-generator-action@v1 | |
with: | |
generator: csharp | |
openapi-file: openapi-3.0.yaml | |
command-args: --additional-properties=apiName=DofusdudeApi,packageName=Dofusdude.Api,packageVersion=${{steps.api-version-print.outputs.apiVersion}} | |
- name: Add actions and patch pom.xml | |
run: | | |
cd csharp-client | |
mkdir -p .github/workflows/ | |
printf '%s\n' 'name: Build' 'on:' ' push:' ' branches: [ main ]' ' pull_request:' ' branches: [ main ]' 'jobs:' ' build:' ' runs-on: ubuntu-latest' ' steps:' ' - uses: actions/checkout@v4' ' - name: Set up dotnet' ' uses: actions/setup-dotnet@v3' ' with:' ' dotnet-version: "8.x"' ' - name: Install deps' ' run: dotnet restore' ' - name: Build' ' run: dotnet build' ' - name: Test' ' run: dotnet test' > .github/workflows/build.yml | |
printf '%s\n' 'name: Publish' 'on:' ' release:' ' types: [ created ]' 'jobs:' ' deploy:' ' runs-on: ubuntu-latest' ' steps:' ' - uses: actions/checkout@v4' ' - name: Set up dotnet' ' uses: actions/setup-dotnet@v3' ' with:' ' dotnet-version: "8.x"' ' - name: Build' ' run: dotnet build --configuration Release' ' - name: Package' ' run: dotnet pack --configuration Release' ' - name: Publish' ' env:' ' NUGET_AUTH_TOKEN: secrets.NUGET_TOKEN' ' run: dotnet nuget push --api-key "$NUGET_AUTH_TOKEN" --source https://api.nuget.org/v3/index.json src/Dofusdude.Api/bin/Release/Dofusdude.Api.${{steps.api-version-print.outputs.apiVersion}}.nupkg' > .github/workflows/publish.yml | |
sed -i 's/<Authors>OpenAPI<\/Authors>/<Authors>stelzo<\/Authors>/g' src/Dofusdude.Api/Dofusdude.Api.csproj | |
sed -i 's/GIT_USER_ID/dofusdude/g' src/Dofusdude.Api/Dofusdude.Api.csproj | |
sed -i 's/GIT_REPO_ID/dofusdude-csharp/g' src/Dofusdude.Api/Dofusdude.Api.csproj | |
sed -i 's/<AssemblyTitle>OpenAPI Library<\/AssemblyTitle>/<AssemblyTitle>Dofusdude API<\/AssemblyTitle>/g' src/Dofusdude.Api/Dofusdude.Api.csproj | |
sed -i 's/<Description>A library generated from a OpenAPI doc<\/Description>/<Description>A project for you - the developer.<\/Description>/g' src/Dofusdude.Api/Dofusdude.Api.csproj | |
sed -i 's/\\"/"/g' README.md | |
sed -i 's/secrets.NUGET_TOKEN/\$\{\{secrets.NUGET_TOKEN\}\}/g' .github/workflows/publish.yml | |
cd .. | |
- name: Pushes to sdk repository | |
uses: cpina/github-action-push-to-another-repository@main | |
env: | |
SSH_DEPLOY_KEY: ${{ secrets.SSH_DEPLOY_KEY_CSHARP }} | |
API_TOKEN_GITHUB: ${{ secrets.PUSH_GITHUB_TOKEN }} | |
with: | |
source-directory: "csharp-client" | |
destination-github-username: "dofusdude" | |
destination-repository-name: "dofusdude-csharp" | |
user-email: [email protected] | |
target-branch: main | |
generate-swift-client: | |
runs-on: ubuntu-latest | |
name: Generate Swift sdk | |
steps: | |
- name: Checkout OpenAPI | |
uses: actions/checkout@v3 | |
with: | |
persist-credentials: false | |
fetch-depth: 0 | |
- name: OpenAPI API Version Print | |
uses: stelzo/openapi-api-version-print@v1 | |
id: api-version-print | |
with: | |
specFile: openapi-3.0.yaml | |
- name: Generate Swift sdk | |
uses: openapi-generators/openapitools-generator-action@v1 | |
with: | |
generator: swift-combine | |
openapi-file: openapi-3.0.yaml | |
command-args: --additional-properties=projectName=Dofusdude | |
- name: Add actions | |
run: | | |
cd swift-combine-client | |
mkdir -p .github/workflows/ | |
printf '%s\n' 'name: Build' 'on:' ' push:' ' branches: [ main ]' ' pull_request:' ' branches: [ main ]' 'jobs:' ' build:' ' runs-on: macos-latest' ' steps:' ' - uses: actions/checkout@v4' ' - name: Set up Swift' ' uses: swift-actions/setup-swift@v2' ' - name: Build' ' run: cd Dofusdude && swift build' ' - name: Test' ' run: cd Dofusdude && swift test' > .github/workflows/build.yml | |
cd .. | |
- name: Pushes to sdk repository | |
uses: cpina/github-action-push-to-another-repository@main | |
env: | |
SSH_DEPLOY_KEY: ${{ secrets.SSH_DEPLOY_KEY_SWIFT }} | |
API_TOKEN_GITHUB: ${{ secrets.PUSH_GITHUB_TOKEN }} | |
with: | |
source-directory: "swift-combine-client" | |
destination-github-username: "dofusdude" | |
destination-repository-name: "dofusdude-swift" | |
user-email: [email protected] | |
target-branch: main | |
generate-dart-client: | |
runs-on: ubuntu-latest | |
name: Generate Dart sdk | |
steps: | |
- name: Checkout OpenAPI | |
uses: actions/checkout@v3 | |
with: | |
persist-credentials: false | |
fetch-depth: 0 | |
- name: OpenAPI API Version Print | |
uses: stelzo/openapi-api-version-print@v1 | |
id: api-version-print | |
with: | |
specFile: openapi-3.0.yaml | |
- name: Generate Dart sdk | |
uses: openapi-generators/openapitools-generator-action@v1 | |
with: | |
generator: dart | |
openapi-file: openapi-3.0.yaml | |
command-args: --additional-properties=pubAuthor=stelzo,[email protected],pubHomepage=https://github.com/dofusdude,pubLibrary=dofusdude.api,pubName=dofusdude,pubVersion=${{steps.api-version-print.outputs.apiVersion}},pubRepository=https://github.com/dofusdude/dofusdude-dart | |
- name: Add actions | |
run: | | |
cd dart-client | |
#mkdir -p .github/workflows/ | |
#printf '%s\n' 'name: Build' 'on:' ' push:' ' branches: [ main ]' ' pull_request:' ' branches: [ main ]' 'jobs:' ' build:' ' runs-on: ubuntu-latest' ' steps:' ' - uses: actions/checkout@v4' ' - name: Set up Dart' ' uses: dart-lang/setup-dart@v1' ' - name: Install deps' ' run: dart pub get' ' - name: Test' ' run: dart test' > .github/workflows/build.yml | |
printf '%s\n' 'name: Publish' 'on:' ' push:' ' tags:' ' - 'v[0-9]+.[0-9]+.[0-9]+*'' 'jobs:' ' publish:' ' permissions:' ' id-token: write' ' uses: dart-lang/setup-dart/.github/workflows/publish.yml@v1' > .github/workflows/publish.yml | |
sed -i 's/\\"/"/g' README.md | |
cd .. | |
- name: Pushes to sdk repository | |
uses: cpina/github-action-push-to-another-repository@main | |
env: | |
SSH_DEPLOY_KEY: ${{ secrets.SSH_DEPLOY_KEY_DART }} | |
API_TOKEN_GITHUB: ${{ secrets.PUSH_GITHUB_TOKEN }} | |
with: | |
source-directory: "dart-client" | |
destination-github-username: "dofusdude" | |
destination-repository-name: "dofusdude-dart" | |
user-email: [email protected] | |
target-branch: main | |
generate-c-client: | |
runs-on: ubuntu-latest | |
name: Generate C sdk | |
steps: | |
- name: Checkout OpenAPI | |
uses: actions/checkout@v3 | |
with: | |
persist-credentials: false | |
fetch-depth: 0 | |
- name: Generate Dart sdk | |
uses: openapi-generators/openapitools-generator-action@v1 | |
with: | |
generator: c | |
openapi-file: openapi-3.0.yaml | |
- name: Add actions | |
run: | | |
cd c-client | |
sed -i 's/\\"/"/g' README.md | |
cd .. | |
- name: Pushes to sdk repository | |
uses: cpina/github-action-push-to-another-repository@main | |
env: | |
SSH_DEPLOY_KEY: ${{ secrets.SSH_DEPLOY_KEY_C }} | |
API_TOKEN_GITHUB: ${{ secrets.PUSH_GITHUB_TOKEN }} | |
with: | |
source-directory: "c-client" | |
destination-github-username: "dofusdude" | |
destination-repository-name: "dofusdude-c" | |
user-email: [email protected] | |
target-branch: main | |
generate-go-client: | |
runs-on: ubuntu-latest | |
name: Generate go sdk | |
steps: | |
- name: Checkout OpenAPI | |
uses: actions/checkout@v3 | |
with: | |
persist-credentials: false | |
fetch-depth: 0 | |
- name: Generate go sdk | |
uses: openapi-generators/openapitools-generator-action@v1 | |
with: | |
generator: go | |
openapi-file: openapi-3.0.yaml | |
command-args: --additional-properties=packageName=dodugo | |
- name: Setup Go environment | |
uses: actions/[email protected] | |
with: | |
check-latest: true | |
go-version-file: go-client/go.mod | |
cache-dependency-path: go-client/go.sum | |
- name: Add actions | |
run: | | |
cd go-client | |
mkdir -p .github/workflows/ | |
printf '%s\n' 'name: Go' 'on:' ' push:' ' branches: [ main ]' ' pull_request:' ' branches: [ main ]' 'jobs:' ' build:' ' runs-on: ubuntu-latest' ' steps:' ' - uses: actions/checkout@v3' ' - name: Set up Go' ' uses: actions/setup-go@v2' ' with:' ' go-version: 1.19' ' - name: Build' ' run: go build -v ./...' > .github/workflows/build.yml | |
grep -rl GIT_USER_ID . | xargs sed -i 's/GIT_USER_ID\/GIT_REPO_ID/\dofusdude\/dodugo/g' | |
sed -i 's/\\"/"/g' README.md | |
go get -u ./... | |
go mod tidy | |
printf '%s\n' '* linguist-vendored' '*.go linguist-vendored=false' > .gitattributes | |
cd .. | |
- name: Pushes to sdk repository | |
uses: cpina/github-action-push-to-another-repository@main | |
env: | |
SSH_DEPLOY_KEY: ${{ secrets.SSH_DEPLOY_KEY_GO }} | |
API_TOKEN_GITHUB: ${{ secrets.PUSH_GITHUB_TOKEN }} | |
with: | |
source-directory: "go-client" | |
destination-github-username: "dofusdude" | |
destination-repository-name: "dodugo" | |
user-email: [email protected] | |
target-branch: main | |
generate-python-client: | |
runs-on: ubuntu-latest | |
name: Generate python sdk | |
steps: | |
- name: Checkout OpenAPI | |
uses: actions/checkout@v3 | |
with: | |
persist-credentials: false | |
fetch-depth: 0 | |
- name: OpenAPI API Version Print | |
uses: stelzo/openapi-api-version-print@v1 | |
id: api-version-print | |
with: | |
specFile: openapi-3.0.yaml | |
- name: Generate python sdk | |
uses: openapi-generators/openapitools-generator-action@v1 | |
with: | |
generator: python | |
openapi-file: openapi-3.0.yaml | |
command-args: --additional-properties=packageName=dofusdude,projectName=dofusdude,packageUrl=https://github.com/dofusdude/dofusdude-py,packageVersion=${{steps.api-version-print.outputs.apiVersion}} | |
- name: Setup Python environment | |
uses: actions/[email protected] | |
with: | |
python-version: 3.8 | |
- name: Add actions | |
run: | | |
cd python-client | |
mkdir -p .github/workflows/ | |
printf '%s\n' 'name: Upload Python Package' 'on:' ' release:' ' types: [published]' 'permissions:' ' contents: read' 'jobs:' ' deploy:' ' runs-on: ubuntu-latest' ' steps:' ' - uses: actions/checkout@v3' ' - name: Set up Python' ' uses: actions/setup-python@v3' ' with:' ' python-version: 3.8' ' - name: Install dependencies' ' run: |' ' python -m pip install --upgrade pip' ' pip install build' ' - name: Build package' ' run: python -m build' ' - name: Publish package' ' uses: pypa/gh-action-pypi-publish@27b31702a0e7fc50959f5ad993c78deac1bdfc29' ' with:' ' user: __token__' ' password: secrets.PYPI_API_TOKEN' > .github/workflows/publish.yml | |
sed -i 's/GIT_USER_ID\/GIT_REPO_ID/\dofusdude\/dofusdude-py/g' README.md | |
sed -i 's/\\"/"/g' README.md | |
sed -i 's/secrets.PYPI_API_TOKEN/\$\{\{secrets.PYPI_API_TOKEN\}\}/g' .github/workflows/publish.yml | |
cd .. | |
- name: Pushes to sdk repository | |
uses: cpina/github-action-push-to-another-repository@main | |
env: | |
SSH_DEPLOY_KEY: ${{ secrets.SSH_DEPLOY_KEY_PY }} | |
API_TOKEN_GITHUB: ${{ secrets.PUSH_GITHUB_TOKEN }} | |
with: | |
source-directory: "python-client" | |
destination-github-username: "dofusdude" | |
destination-repository-name: "dofusdude-py" | |
user-email: [email protected] | |
target-branch: main | |
generate-php-client: | |
runs-on: ubuntu-latest | |
name: Generate php sdk | |
steps: | |
- name: Checkout OpenAPI | |
uses: actions/checkout@v3 | |
with: | |
persist-credentials: false | |
fetch-depth: 0 | |
- name: Generate php sdk | |
uses: openapi-generators/openapitools-generator-action@v1 | |
with: | |
generator: php | |
openapi-file: openapi-3.0.yaml | |
command-args: --additional-properties=packageName=dofusdude-php | |
- name: Add actions | |
run: | | |
cd php-client | |
mkdir -p .github/workflows/ | |
printf '%s\n' 'name: PHP Composer' 'on:' ' push:' ' branches: [ "main" ]' 'permissions:' ' contents: read' 'jobs:' ' build:' ' runs-on: ubuntu-latest' ' steps:' ' - uses: actions/checkout@v3' ' - name: Validate composer.json and composer.lock' ' run: composer validate --strict' ' - name: Cache Composer packages' ' id: composer-cache' ' uses: actions/cache@v3' ' with:' ' path: vendor' ' key: ${{ runner.os }}-php-${{ hashFiles('**/composer.lock') }}' ' restore-keys: |' ' ${{ runner.os }}-php-' ' - name: Install dependencies' ' run: composer install --prefer-dist --no-progress' > .github/workflows/build.yml | |
grep -rl GIT_USER_ID . | xargs sed -i 's/GIT_USER_ID\/GIT_REPO_ID/\dofusdude\/dofusdude-php/g' | |
sed -i 's/\\"/"/g' README.md | |
sed -i 's/"description"/"name": "dofusdude\/dofusdude-php",\n "description"/g' composer.json | |
cd .. | |
- name: Pushes to another repository | |
uses: cpina/github-action-push-to-another-repository@main | |
env: | |
SSH_DEPLOY_KEY: ${{ secrets.SSH_DEPLOY_KEY_PHP }} | |
API_TOKEN_GITHUB: ${{ secrets.PUSH_GITHUB_TOKEN }} | |
with: | |
source-directory: "php-client" | |
destination-github-username: "dofusdude" | |
destination-repository-name: "dofusdude-php" | |
user-email: [email protected] | |
target-branch: main |