diff --git a/.github/workflows/node.yml b/.github/workflows/node.yml index 98f0779..5e51ada 100644 --- a/.github/workflows/node.yml +++ b/.github/workflows/node.yml @@ -58,7 +58,6 @@ jobs: publish-npm: runs-on: ubuntu-latest - needs: integration-tests environment: delivery if: github.event_name == 'release' @@ -66,10 +65,13 @@ jobs: - uses: actions/checkout@v4 with: token: ${{ secrets.GH_ACTION_ACCESS_TOKEN }} + ref: ${{ github.ref_name }} - uses: actions/setup-node@v4 with: node-version: 16.x registry-url: https://registry.npmjs.org/ + - name: Validate release + uses: onfido/onfido-actions/release-check@main - name: Install dependencies run: npm ci - name: Build and publish package @@ -77,31 +79,5 @@ jobs: npm publish env: NODE_AUTH_TOKEN: ${{ secrets.npm_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 + - name: Update and commit CHANGELOG.md + uses: onfido/onfido-actions/update-changelog@main \ No newline at end of file diff --git a/CHANGELOG.md b/CHANGELOG.md index bd542b6..a9cc4c7 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,10 @@ # Changelog +## v3.1.0 24th June 2024 + +- Library has been updated and automatically generated from [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 been refreshed and API coverage increased + ## v3.0.0 6th May 2024 (pre-release) - Make library auto-generated and based on [Onfido OpenAPI spec](https://github.com/onfido/onfido-openapi-spec)