Skip to content

Add mobile navigation with slide-in sidebar drawer #12

Add mobile navigation with slide-in sidebar drawer

Add mobile navigation with slide-in sidebar drawer #12

Workflow file for this run

name: Release
on:
push:
tags:
- 'v*'
workflow_dispatch:
inputs:
version:
description: 'Version to release (e.g., 1.0.1 or patch/minor/major)'
required: true
default: 'patch'
permissions:
contents: write
id-token: write # Required for npm trusted publishing (OIDC)
jobs:
release:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
with:
token: ${{ secrets.GITHUB_TOKEN }}
- name: Setup Node
uses: actions/setup-node@v4
with:
node-version: '24' # Node 24 includes npm 11+ with OIDC support
- name: Install dependencies
run: npm install
- name: Configure git
run: |
git config user.name "github-actions[bot]"
git config user.email "github-actions[bot]@users.noreply.github.com"
- name: Bump version
id: version
working-directory: packages/create-unmint
run: |
if [ "${{ github.event_name }}" = "push" ]; then
# Extract version from tag (v1.0.1 -> 1.0.1)
VERSION="${GITHUB_REF#refs/tags/v}"
else
INPUT="${{ github.event.inputs.version }}"
if [[ "$INPUT" =~ ^[0-9]+\.[0-9]+\.[0-9]+$ ]]; then
VERSION="$INPUT"
else
# patch/minor/major - let npm calculate
npm version "$INPUT" --no-git-tag-version
VERSION=$(node -p "require('./package.json').version")
echo "version=${VERSION}" >> "$GITHUB_OUTPUT"
exit 0
fi
fi
npm version "$VERSION" --no-git-tag-version
echo "version=${VERSION}" >> "$GITHUB_OUTPUT"
- name: Build CLI
run: npm run build
working-directory: packages/create-unmint
- name: Commit version bump
if: github.event_name == 'workflow_dispatch'
run: |
git add packages/create-unmint/package.json
git commit -m "Release v${{ steps.version.outputs.version }}"
git tag "v${{ steps.version.outputs.version }}"
git push origin main --tags
- name: Publish to npm
uses: JS-DevTools/npm-publish@v4
with:
package: packages/create-unmint/package.json
access: public
- name: Create GitHub Release
uses: softprops/action-gh-release@v1
with:
tag_name: v${{ steps.version.outputs.version }}
generate_release_notes: true
body: |
## Installation
```bash
npx create-unmint@${{ steps.version.outputs.version }} my-docs
```
See the [README](https://github.com/gregce/unmint#readme) for full documentation.