Release #4724
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: Release | |
| on: | |
| schedule: | |
| - cron: "0 */12 * * *" | |
| workflow_dispatch: {} | |
| jobs: | |
| lint: | |
| name: lint | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| with: | |
| token: ${{ secrets.GITHUB_PAT_FROM_ZEKE }} | |
| lfs: true | |
| - name: Checkout LFS objects | |
| run: git lfs checkout | |
| - name: npm ci | |
| run: npm ci | |
| - name: release | |
| run: | | |
| git checkout master | |
| git config --global user.name "github-actions" | |
| git config --global user.email "[email protected]" | |
| npm run update | |
| npm test | |
| [[ `git status --porcelain` ]] || exit | |
| git add . | |
| # Publish only if data/packages.json changed | |
| if [[ -z `git status --porcelain 'data/packages.json'` ]]; then | |
| git commit -m "update metadata" | |
| git push origin master | |
| else | |
| echo "//registry.npmjs.org/:_authToken=${{ secrets.NPM_TOKEN }}" > ~/.npmrc | |
| # bump the version, commit, and create a tag | |
| npm version patch -f -m "update all-the-package-repos to %s" | |
| git push origin master --follow-tags | |
| npm publish | |
| fi |