Skip to content

Release v5.6.19 (#25184) #300

Release v5.6.19 (#25184)

Release v5.6.19 (#25184) #300

Workflow file for this run

name: Release package
on:
push:
branches:
- main
paths:
- "RELEASE_NOTES.md"
release:
types:
- published
env:
GITHUB_TOKEN: ${{ secrets.GH_TOKEN }}
permissions:
contents: write
issues: write
jobs:
create-release:
if: github.repository == 'mdn/browser-compat-data' && github.event_name == 'push' && startsWith(github.event.head_commit.message, 'Release v')
name: Create release
runs-on: ubuntu-latest
steps:
- name: Checkout (BCD)
uses: actions/checkout@v4
- name: Create release
run: |
VERSION=v$(jq -r '.version' package.json)
awk '/^## /{if (p) exit; p=1; next} p' RELEASE_NOTES.md | tail -n +4 >> CURRENT_RELEASE_NOTES.md
gh release create $VERSION --title=$VERSION --target $GITHUB_SHA --notes-file CURRENT_RELEASE_NOTES.md --latest
publish-release:
if: github.event_name == 'release'
name: Publish release
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version-file: ".nvmrc"
registry-url: "https://registry.npmjs.org/"
cache: npm
- run: npm ci
- run: npm test
env:
FORCE_COLOR: 3
- run: npm run build
- run: npm publish build/ --access public
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
- name: Add JSON as a release asset
run: gh release upload ${GITHUB_REF#refs/*/} build/data.json
# - name: Publish stats for all data (#3555)
# run: npm run --silent stats | gh issue comment https://github.com/mdn/browser-compat-data/issues/3555 --body-file -