ISO10383 #116
This file contains 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: ISO10383 | |
on: | |
schedule: | |
- cron: '0 10 15 AUG *' # 2023 | |
- cron: '0 10 12 SEP *' # 2023 | |
- cron: '0 10 10 OCT *' # 2023 | |
- cron: '0 10 15 NOV *' # 2023 | |
- cron: '0 10 12 DEC *' # 2023 | |
- cron: '0 10 09 JAN *' # 2024 | |
- cron: '0 10 13 FEB *' # 2024 | |
- cron: '0 10 12 MAR *' # 2024 | |
concurrency: | |
group: iso10383 | |
cancel-in-progress: true | |
jobs: | |
update-csv: | |
name: Update CSV | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v4 | |
with: | |
ref: ${{ github.event.repository.default_branch }} | |
- name: Download dependencies | |
uses: bahmutov/npm-install@v1 | |
- name: Download CSV | |
run: | | |
cd packages/iso-10383 | |
curl -o src/lib/specifications/iso10383.csv https://www.iso20022.org/sites/default/files/ISO10383_MIC/ISO10383_MIC.csv | |
yarn generate | |
- name: Create changeset | |
run: | | |
cat <<EOF > .changeset/update-iso10383-specifications.md | |
--- | |
'@sebspark/iso-10383': minor | |
--- | |
Update ISO10383 specifications. | |
EOF | |
- name: Format generated code | |
run: yarn format -- --cache | |
- name: Push changes | |
env: | |
CI_COMMIT_MESSAGE: 'chore: update ISO-10383 specifications' | |
CI_COMMIT_AUTHOR: 📈 ISO10383 Bot | |
run: | | |
git config --global user.name "${{ env.CI_COMMIT_AUTHOR }}" | |
git config --global user.email "[email protected]" | |
git add . | |
git commit -m "${{ env.CI_COMMIT_MESSAGE }}" | |
git push | |
changeset: | |
name: Create Release Pull Request or Publish to NPM | |
runs-on: ubuntu-latest | |
needs: [update-csv] | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v4 | |
- name: Download dependencies | |
uses: bahmutov/npm-install@v1 | |
- name: Create Changeset PR | |
uses: changesets/action@v1 | |
with: | |
publish: npm run release | |
commit: 'chore(release): update versions' | |
title: 'chore(release): update versions' | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
NPM_TOKEN: ${{ secrets.NPM_TOKEN }} |