Skip to content

release v1.2.3

release v1.2.3 #33

Workflow file for this run

name: CI
on:
push:
branches: [ main ]
pull_request:
branches: [ main ]
permissions:
contents: write
jobs:
build:
runs-on: ubuntu-latest
strategy:
matrix:
node-version: [20.x]
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Set up Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node-version }}
- name: Install dependencies
run: npm ci
- name: Run tests
run: npm test
- name: Build project
run: npm run build
- name: Check build output exists
run: |
test -f dist/quikdown.umd.js
test -f dist/quikdown.umd.min.js
test -f dist/quikdown.esm.js
test -f dist/quikdown.cjs
test -f dist/quikdown_bd.umd.js
test -f dist/quikdown_bd.esm.js
test -f dist/quikdown_bd.cjs
test -f dist/quikdown_edit.umd.js
test -f dist/quikdown_edit.esm.js
test -f dist/quikdown_edit.cjs
test -f dist/quikdown_ast.esm.js
test -f dist/quikdown_json.esm.js
test -f dist/quikdown_yaml.esm.js
test -f dist/quikdown_ast_html.esm.js
# Coverage is baked into the README badge by `npm test` via
# tools/updateBadges.js — no external coverage service needed.
# Auto-tag job: creates a vX.Y.Z git tag if package.json version is new.
# Skips gracefully (does NOT fail) when the version is unchanged — this lets
# non-release commits (docs, workflow tweaks, CI fixes) land on main without
# requiring a version bump. The tag push triggers publish.yml for release.
tag-version:
needs: build
if: github.ref == 'refs/heads/main' && github.event_name == 'push'
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Set up Node.js
uses: actions/setup-node@v4
with:
node-version: 20.x
- name: Read version from package.json
id: version
run: echo "version=v$(node -p 'require("./package.json").version')" >> "$GITHUB_OUTPUT"
- name: Check if tag already exists on origin
id: tag_exists
run: |
TAG="${{ steps.version.outputs.version }}"
if git ls-remote --tags origin "$TAG" | grep -q .; then
echo "exists=true" >> "$GITHUB_OUTPUT"
echo "::notice::Tag $TAG already exists — skipping tag creation (not a release commit)."
else
echo "exists=false" >> "$GITHUB_OUTPUT"
echo "Tag $TAG does not exist yet — will create it."
fi
- name: Check npm version collision (only for new tags)
if: steps.tag_exists.outputs.exists == 'false'
run: node tools/checkVersion.cjs
- name: Create and push tag (only for new versions)
if: steps.tag_exists.outputs.exists == 'false'
run: |
git tag "${{ steps.version.outputs.version }}"
git push origin "${{ steps.version.outputs.version }}"
echo "::notice::Tag ${{ steps.version.outputs.version }} created and pushed — publish.yml will run."