From 8a7d6120429e0b61d6b3201638a0e96295d13204 Mon Sep 17 00:00:00 2001 From: Geert Eltink <9497586+geerteltink@users.noreply.github.com> Date: Tue, 29 Dec 2020 13:16:30 +0100 Subject: [PATCH] ci: synchronize workflows (#60) * ci: synchronize workflows * ci: create new milestones on release --- .github/workflows/automatic-release.yml | 62 ++++++++++++--------- .github/workflows/coding-standards.yml | 23 ++------ .github/workflows/conventional-pr-title.yml | 2 +- .github/workflows/merged-notification.yml | 2 +- .github/workflows/static-analysis.yml | 23 ++------ .gitignore | 2 +- composer.json | 1 + 7 files changed, 52 insertions(+), 63 deletions(-) diff --git a/.github/workflows/automatic-release.yml b/.github/workflows/automatic-release.yml index 2cd5b0d..ce0f6e2 100644 --- a/.github/workflows/automatic-release.yml +++ b/.github/workflows/automatic-release.yml @@ -1,45 +1,55 @@ -name: Automatic Releases +name: "Automatic Releases" on: milestone: types: - - closed + - "closed" jobs: release: - name: GIT tag, release & create merge-up PR + name: "GIT tag, release & create merge-up PR" runs-on: ubuntu-latest steps: - - name: Checkout - uses: actions/checkout@v2 + - name: "Checkout" + uses: "actions/checkout@v2" - - name: Release - uses: laminas/automatic-releases@v1 + - name: "Release" + uses: "laminas/automatic-releases@v1" with: - command-name: laminas:automatic-releases:release + command-name: "laminas:automatic-releases:release" env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - SIGNING_SECRET_KEY: ${{ secrets.SIGNING_SECRET_KEY }} - GIT_AUTHOR_NAME: ${{ secrets.GIT_AUTHOR_NAME }} - GIT_AUTHOR_EMAIL: ${{ secrets.GIT_AUTHOR_EMAIL }} + "GITHUB_TOKEN": ${{ secrets.ORGANIZATION_ADMIN_TOKEN }} + "SIGNING_SECRET_KEY": ${{ secrets.SIGNING_SECRET_KEY }} + "GIT_AUTHOR_NAME": ${{ secrets.GIT_AUTHOR_NAME }} + "GIT_AUTHOR_EMAIL": ${{ secrets.GIT_AUTHOR_EMAIL }} - - name: Create Merge-Up Pull Request - uses: laminas/automatic-releases@v1 + - name: "Create Merge-Up Pull Request" + uses: "laminas/automatic-releases@v1" with: - command-name: laminas:automatic-releases:create-merge-up-pull-request + command-name: "laminas:automatic-releases:create-merge-up-pull-request" env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - SIGNING_SECRET_KEY: ${{ secrets.SIGNING_SECRET_KEY }} - GIT_AUTHOR_NAME: ${{ secrets.GIT_AUTHOR_NAME }} - GIT_AUTHOR_EMAIL: ${{ secrets.GIT_AUTHOR_EMAIL }} + "GITHUB_TOKEN": ${{ secrets.GITHUB_TOKEN }} + "SIGNING_SECRET_KEY": ${{ secrets.SIGNING_SECRET_KEY }} + "GIT_AUTHOR_NAME": ${{ secrets.GIT_AUTHOR_NAME }} + "GIT_AUTHOR_EMAIL": ${{ secrets.GIT_AUTHOR_EMAIL }} - - name: Create and/or Switch to new Release Branch - uses: laminas/automatic-releases@v1 + - name: "Create and/or Switch to new Release Branch" + uses: "laminas/automatic-releases@v1" with: - command-name: laminas:automatic-releases:switch-default-branch-to-next-minor + command-name: "laminas:automatic-releases:switch-default-branch-to-next-minor" env: - GITHUB_TOKEN: ${{ secrets.ORGANIZATION_ADMIN_TOKEN }} - SIGNING_SECRET_KEY: ${{ secrets.SIGNING_SECRET_KEY }} - GIT_AUTHOR_NAME: ${{ secrets.GIT_AUTHOR_NAME }} - GIT_AUTHOR_EMAIL: ${{ secrets.GIT_AUTHOR_EMAIL }} + "GITHUB_TOKEN": ${{ secrets.ORGANIZATION_ADMIN_TOKEN }} + "SIGNING_SECRET_KEY": ${{ secrets.SIGNING_SECRET_KEY }} + "GIT_AUTHOR_NAME": ${{ secrets.GIT_AUTHOR_NAME }} + "GIT_AUTHOR_EMAIL": ${{ secrets.GIT_AUTHOR_EMAIL }} + + - name: "Create new milestones" + uses: "laminas/automatic-releases@v1" + with: + command-name: "laminas:automatic-releases:create-milestones" + env: + "GITHUB_TOKEN": ${{ secrets.GITHUB_TOKEN }} + "SIGNING_SECRET_KEY": ${{ secrets.SIGNING_SECRET_KEY }} + "GIT_AUTHOR_NAME": ${{ secrets.GIT_AUTHOR_NAME }} + "GIT_AUTHOR_EMAIL": ${{ secrets.GIT_AUTHOR_EMAIL }} diff --git a/.github/workflows/coding-standards.yml b/.github/workflows/coding-standards.yml index 621f4fc..89667e6 100644 --- a/.github/workflows/coding-standards.yml +++ b/.github/workflows/coding-standards.yml @@ -11,10 +11,8 @@ jobs: strategy: matrix: - dependencies: - - locked php-version: - - 8.0 + - 7.4 operating-system: - ubuntu-latest @@ -35,20 +33,11 @@ jobs: path: | ~/.composer/cache vendor - key: php-${{ matrix.php-version }}-${{ matrix.dependencies }} - restore-keys: php-${{ matrix.php-version }}-${{ matrix.dependencies }} + key: php-${{ matrix.php-version }} + restore-keys: php-${{ matrix.php-version }} - - name: Install lowest dependencies - if: ${{ matrix.dependencies == 'lowest' }} - run: composer update --prefer-lowest --no-interaction --no-progress --no-suggest --ignore-platform-reqs + - name: Install dependencies + run: composer install --no-interaction --no-progress --no-suggest - - name: Install highest dependencies - if: ${{ matrix.dependencies == 'highest' }} - run: composer update --no-interaction --no-progress --no-suggest --ignore-platform-reqs - - - name: Install locked dependencies - if: ${{ matrix.dependencies == 'locked' }} - run: composer install --no-interaction --no-progress --no-suggest --ignore-platform-reqs - - - name: Coding Standard + - name: Check coding standard run: vendor/bin/phpcs diff --git a/.github/workflows/conventional-pr-title.yml b/.github/workflows/conventional-pr-title.yml index a57e3a7..42d4749 100644 --- a/.github/workflows/conventional-pr-title.yml +++ b/.github/workflows/conventional-pr-title.yml @@ -1,4 +1,5 @@ name: Check PR title + on: pull_request: types: @@ -19,4 +20,3 @@ jobs: preset: conventional-changelog-angular@latest env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - diff --git a/.github/workflows/merged-notification.yml b/.github/workflows/merged-notification.yml index 7e578a6..00a4b18 100644 --- a/.github/workflows/merged-notification.yml +++ b/.github/workflows/merged-notification.yml @@ -18,5 +18,5 @@ jobs: issue_number: context.issue.number, owner: context.repo.owner, repo: context.repo.repo, - body: '👋 Thanks for contributing!' + body: 'Thanks for contributing!' }) diff --git a/.github/workflows/static-analysis.yml b/.github/workflows/static-analysis.yml index c916eeb..2c2b097 100644 --- a/.github/workflows/static-analysis.yml +++ b/.github/workflows/static-analysis.yml @@ -11,10 +11,8 @@ jobs: strategy: matrix: - dependencies: - - locked php-version: - - 8.0 + - 7.4 operating-system: - ubuntu-latest @@ -35,20 +33,11 @@ jobs: path: | ~/.composer/cache vendor - key: php-${{ matrix.php-version }}-${{ matrix.dependencies }} - restore-keys: php-${{ matrix.php-version }}-${{ matrix.dependencies }} + key: php-${{ matrix.php-version }} + restore-keys: php-${{ matrix.php-version }} - - name: Install lowest dependencies - if: ${{ matrix.dependencies == 'lowest' }} - run: composer update --prefer-lowest --no-interaction --no-progress --no-suggest --ignore-platform-reqs + - name: Install dependencies + run: composer install --no-interaction --no-progress --no-suggest - - name: Install highest dependencies - if: ${{ matrix.dependencies == 'highest' }} - run: composer update --no-interaction --no-progress --no-suggest --ignore-platform-reqs - - - name: Install locked dependencies - if: ${{ matrix.dependencies == 'locked' }} - run: composer install --no-interaction --no-progress --no-suggest --ignore-platform-reqs - - - name: Rub static analysis + - name: Run static analysis run: vendor/bin/psalm diff --git a/.gitignore b/.gitignore index e3b381a..e469952 100644 --- a/.gitignore +++ b/.gitignore @@ -2,4 +2,4 @@ .phpunit.result.cache composer.lock phpunit.xml -/vendor/ +vendor/ diff --git a/composer.json b/composer.json index accda3d..923ae99 100644 --- a/composer.json +++ b/composer.json @@ -1,5 +1,6 @@ { "name": "xtreamwayz/psr-container-messenger", + "type": "library", "description": "PSR Container compatible Symfony Messenger", "license": "MIT", "authors": [