Skip to content

Bump @eslint/markdown from 7.2.0 to 7.4.1 (#2213) #1142

Bump @eslint/markdown from 7.2.0 to 7.4.1 (#2213)

Bump @eslint/markdown from 7.2.0 to 7.4.1 (#2213) #1142

Workflow file for this run

name: Publish
on:
push:
branches:
- main
permissions: read-all
jobs:
check:
name: Check
runs-on: ubuntu-24.04
outputs:
released: ${{ steps.version.outputs.released }}
release_notes: ${{ steps.version.outputs.release_notes }}
version: ${{ steps.version.outputs.version }}
steps:
- name: Checkout repository
uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
with:
fetch-depth: 0 # To fetch all tags
persist-credentials: false
- name: Install Node.js
uses: actions/[email protected]
with:
cache: npm
node-version-file: .nvmrc
- name: Install dependencies
run: npm clean-install
- name: Check if the current version is already released
id: version
run: |
VERSION="v$(jq -r '.version' < package.json)"
echo "version=$VERSION" >> "$GITHUB_OUTPUT"
if [ "$(git tag --list "$VERSION")" ]; then
echo 'released=true' >> "$GITHUB_OUTPUT"
else
echo 'released=false' >> "$GITHUB_OUTPUT"
{
echo 'release_notes<<EOF'
node script/release/get-release-notes.js
echo 'EOF'
} >> "$GITHUB_OUTPUT"
fi
git:
name: git
runs-on: ubuntu-24.04
if: ${{ needs.check.outputs.released == 'false' }}
needs:
- check
permissions:
contents: write # To push a ref
steps:
- name: Checkout repository
uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
with:
fetch-depth: 0 # To fetch all major version branches
- name: Get release version
id: major_version
env:
VERSION: ${{ needs.check.outputs.version }}
run: |
echo "result=${VERSION%%.*}" >>"${GITHUB_OUTPUT}"
- name: Create release tag
env:
VERSION: ${{ needs.check.outputs.version }}
run: |
git tag "${VERSION}"
git push origin "${VERSION}"
- name: Update major version branch
env:
MAJOR_VERSION: ${{ steps.major_version.outputs.result }}
run: |
git push origin "HEAD:${MAJOR_VERSION}"
github:
name: GitHub
runs-on: ubuntu-24.04
if: ${{ needs.check.outputs.released == 'false' }}
needs:
- check
- git
permissions:
contents: write # To create a GitHub Release
steps:
- name: Create GitHub release
uses: ncipollo/release-action@b7eabc95ff50cbeeedec83973935c8f306dfcd0b # v1.20.0
with:
tag: ${{ needs.check.outputs.version }}
name: Release ${{ needs.check.outputs.version }}
body: ${{ needs.check.outputs.release_notes }}
draft: false
prerelease: false
npm:
name: npm
runs-on: ubuntu-24.04
if: ${{ needs.check.outputs.released == 'false' }}
permissions:
id-token: write # To attach provenance to the published package
environment:
name: npm
url: https://www.npmjs.com/package/shescape
needs:
- check
steps:
- name: Checkout repository
uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
with:
persist-credentials: false
- name: Verify action checksums
uses: ./.github/actions/ghasum
- name: Install Node.js
uses: actions/[email protected]
with:
node-version-file: .nvmrc
registry-url: https://registry.npmjs.org
- name: Install dependencies
run: npm clean-install
- name: Publish to npm
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
run: |
npm run transpile
npm publish --provenance