From aa7df6211cba90574da65f295bfc5ee7b4816724 Mon Sep 17 00:00:00 2001 From: Davide Vacca Date: Mon, 24 Jun 2024 15:57:11 +0200 Subject: [PATCH] Update CHANGELOG (and remove step in charge of that from CI for now) --- .github/workflows/php.yml | 37 +++---------------------------------- CHANGELOG.md | 5 +++++ 2 files changed, 8 insertions(+), 34 deletions(-) diff --git a/.github/workflows/php.yml b/.github/workflows/php.yml index 8b594da..2ab8fc0 100644 --- a/.github/workflows/php.yml +++ b/.github/workflows/php.yml @@ -33,7 +33,8 @@ jobs: with: php_version: ${{ matrix.php-version }} - name: Test with phpunit - if: ${{ github.event.pull_request.head.repo.full_name == github.repository }} + if: ${{ github.event.pull_request.head.repo.full_name == github.repository && + github.actor != 'dependabot[bot]' }} run: | vendor/bin/phpunit env: @@ -47,12 +48,9 @@ jobs: publish: runs-on: ubuntu-latest needs: integration-tests - environment: delivery if: github.event_name == 'release' + environment: delivery steps: - - uses: actions/checkout@v4 - with: - token: ${{ secrets.GH_ACTION_ACCESS_TOKEN }} - name: Notify packagist.org about the new package run: | curl -XPOST -H'content-type:application/json' \ @@ -62,32 +60,3 @@ jobs: PACKAGIST_API_USER: ${{ secrets.PACKAGIST_API_USER }} PACKAGIST_API_TOKEN: ${{ secrets.PACKAGIST_API_TOKEN }} - - name: Update CHANGELOG.md - run: | - TMP_FILE=$(mktemp) - - RELEASE_VERSION=$(jq -r '.release' .release.json) - RELEASE_DATE=`date +'%dth %B %Y' | sed -E 's/^0//;s/^([2,3]?)1th/\11st/;s/^([2]?)2th/\12nd/;s/^([2]?)3th/\13rd/'` - - SPEC_COMMIT_SHA=$(jq -r '.source.short_sha' .release.json) - SPEC_COMMIT_URL=$(jq -r '.source.repo_url + "/commit/" + .source.long_sha' .release.json) - SPEC_RELEASE_VERSION=$(jq -r '.source.version' .release.json) - SPEC_RELEASE_URL=$(jq -r '.source.repo_url + "/releases/tag/" + .source.version' .release.json) - - echo -e "# Changelog\n\n## $RELEASE_VERSION $RELEASE_DATE\n\n" >| $TMP_FILE - echo -en "${{ github.event.release.body }}\nBased on Onfido OpenAPI spec " >> $TMP_FILE - - if [ -z $SPEC_RELEASE_VERSION ]; then - echo "up to commit [$SPEC_COMMIT_SHA](${SPEC_COMMIT_URL})." >> $TMP_FILE - else - echo "version [$SPEC_RELEASE_VERSION](${SPEC_RELEASE_URL})." >> $TMP_FILE - fi - - grep -v "^# Changelog" CHANGELOG.md >> $TMP_FILE - mv $TMP_FILE CHANGELOG.md - - git config user.name "GitHub Actions Bot" - git config user.email "<>" - git commit -m "Update CHANGELOG.md after library release" CHANGELOG.md - git push - diff --git a/CHANGELOG.md b/CHANGELOG.md index 825c32f..98ffee8 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1 +1,6 @@ # Changelog + +## v7.0.0 24th June 2024 + +- Library has refreshed and automatically generated on [Onfido OpenAPI Spec](https://github.com/onfido/onfido-openapi-spec) (release [v3.0.0](https://github.com/onfido/onfido-openapi-spec/releases/tag/v3.0.0)) +- Integration tests have also been implemented