Skip to content

Release

Release #4813

Workflow file for this run

name: Release
permissions:
id-token: write
contents: write
on:
schedule:
- cron: "0 */12 * * *"
workflow_dispatch: {}
jobs:
lint:
name: lint
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v5
with:
token: ${{ secrets.GITHUB_PAT_FROM_ZEKE }}
lfs: true
- uses: actions/setup-node@v6
with:
node-version: "lts/*"
# At the time of writing, we need to update npm to 11.5.1 or later to
# get support for Trusted Publishing via GitHub Actions. In future, once
# the image and/or setup-node action give us that out of the box, we can
# delete this step (and maybe also stop using setup-node if ubuntu-latest
# contains a recent enough npm version).
- name: Update npm
run: npm install -g npm@latest
- 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 "github-actions@users.noreply.github.com"
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
# 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