ci(ipa): release new version 6.0.0 #97
Workflow file for this run
This file contains hidden or 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: IPA Changelog Check | |
| on: | |
| pull_request: | |
| types: [opened, synchronize, reopened, edited] | |
| paths: | |
| - 'tools/spectral/ipa/package.json' | |
| jobs: | |
| check-changelog: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout Repository | |
| uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 | |
| with: | |
| fetch-depth: 0 | |
| sparse-checkout: | | |
| tools/spectral/ipa | |
| .github/scripts | |
| - name: Fetch Versions | |
| id: version_check | |
| env: | |
| BASE_BRANCH: ${{ github.event.pull_request.base.ref }} | |
| run: | | |
| version_changed=$(./.github/scripts/ipa_version_check.sh) | |
| echo "Version changed? ${version_changed}" | |
| echo "version_changed=${version_changed}" >> "${GITHUB_OUTPUT}" | |
| - name: Check Changelog | |
| working-directory: tools/spectral/ipa | |
| env: | |
| VERSION_BUMP: ${{ steps.version_check.outputs.version_changed }} | |
| run: | | |
| diff_changelog=$(git diff origin/main -- CHANGELOG.md || echo "") | |
| echo "Changelog diff: ${diff_changelog}" | |
| if [[ "${VERSION_BUMP}" == "false" && -n "${diff_changelog}" ]]; then | |
| echo "Error: Changelog should only be updated alongside a version bump. Please restore the changelog." | |
| exit 1 | |
| fi | |
| npm run gen-ipa-changelog | |
| # Check CHANGELOG.md is the generated changelog result | |
| uncommitted_changes=$(git status --porcelain | grep "CHANGELOG.md" || echo "") | |
| if [[ "${VERSION_BUMP}" == "true" && -n "${uncommitted_changes}" ]]; then | |
| echo "Error: Changelog is not the same as the generated result. Please run 'npm run gen-ipa-changelog' from the ipa directory and commit the changes." | |
| exit 1 | |
| fi | |
| exit 0 |