Skip to content

ci(ipa): release new version 1.1.0 #81

ci(ipa): release new version 1.1.0

ci(ipa): release new version 1.1.0 #81

Workflow file for this run

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@692973e3d937129bcbf40652eb9f2f61becf3332
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