feat: add dark_mode_navbar toggle icon tone (v1.3.1) #38
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: Release | ||
|
Check failure on line 1 in .github/workflows/release.yml
|
||
| on: | ||
| push: | ||
| tags: | ||
| - "v*" | ||
| permissions: | ||
| contents: write | ||
| jobs: | ||
| release: | ||
| # Rolling aliases (v1, v1.0, v1.1) are updated by post-release.mjs — not full releases. | ||
| if: github.ref_name =~ /^v\d+\.\d+\.\d+$/ | ||
| runs-on: ubuntu-latest | ||
| steps: | ||
| - name: Checkout | ||
| uses: actions/checkout@v4 | ||
| with: | ||
| fetch-depth: 0 | ||
| - name: Setup pnpm | ||
| uses: pnpm/action-setup@v4 | ||
| - name: Setup Node.js | ||
| uses: actions/setup-node@v4 | ||
| with: | ||
| node-version: "24" | ||
| cache: "pnpm" | ||
| - name: Install dependencies | ||
| run: pnpm install | ||
| - name: Verify package version matches tag | ||
| run: | | ||
| PACKAGE_VERSION=$(node -p "require('./package.json').version") | ||
| TAG_VERSION=${GITHUB_REF#refs/tags/v} | ||
| if [ "$PACKAGE_VERSION" != "$TAG_VERSION" ]; then | ||
| echo "Error: package.json version ($PACKAGE_VERSION) does not match tag version ($TAG_VERSION)" | ||
| exit 1 | ||
| fi | ||
| - name: Generate changelog for release | ||
| id: changelog | ||
| run: | | ||
| VERSION=${GITHUB_REF#refs/tags/v} | ||
| if [ -f "CHANGELOG.adoc" ]; then | ||
| NOTES=$(awk -v v="$VERSION" ' | ||
| $0 ~ "^== \\[" v "\\]" {flag=1; next} | ||
| flag && /^== \[/ {exit} | ||
| flag {print}' CHANGELOG.adoc) | ||
| if [ -z "$NOTES" ]; then | ||
| NOTES="Release v$VERSION" | ||
| fi | ||
| else | ||
| NOTES="Release v$VERSION" | ||
| fi | ||
| echo "$NOTES" > release_notes.md | ||
| - name: Build Antora UI Bundle | ||
| run: | | ||
| curl -L -o default-ui-bundle.zip https://gitlab.com/antora/antora-ui-default/-/jobs/artifacts/HEAD/raw/build/ui-bundle.zip?job=bundle-stable | ||
| mkdir -p build/ui-bundle | ||
| unzip default-ui-bundle.zip -d build/ui-bundle | ||
| cp -r supplemental-ui/* build/ui-bundle/ | ||
| cd build/ui-bundle | ||
| zip -r ../../ui-bundle.zip . | ||
| cd ../.. | ||
| - name: Create GitHub Release | ||
| uses: softprops/action-gh-release@v2 | ||
| with: | ||
| body_path: release_notes.md | ||
| files: ui-bundle.zip | ||
| generate_release_notes: true | ||
| env: | ||
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
| - name: Publish to npm | ||
| if: github.ref_name =~ /^v\d+\.\d+\.\d+$/ && !contains(github.ref_name, '-') | ||
| env: | ||
| NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} | ||
| run: | | ||
| pnpm ui-modules:sync | ||
| pnpm ui-modules:validate | ||
| node -e "const fs=require('fs');const p=JSON.parse(fs.readFileSync('package.json','utf8'));delete p.private;fs.writeFileSync('package.json',JSON.stringify(p,null,2)+'\n')" | ||
| npm publish --access public | ||
| npm deprecate antora-dark-theme@* "Renamed — use valentus-theme (bundled dark mode). See https://github.com/antora-supplemental/valentus-theme" || true | ||
| - name: Resolve release commit | ||
| id: rel | ||
| run: echo "sha=$(git rev-list -n 1 "${GITHUB_REF}")" >> "$GITHUB_OUTPUT" | ||
| - name: Update rolling release lines | ||
| env: | ||
| GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
| VERSION: ${{ github.ref_name }} | ||
| RELEASE_SHA: ${{ steps.rel.outputs.sha }} | ||
| GITHUB_REPOSITORY: ${{ github.repository }} | ||
| run: node .github/scripts/post-release.mjs "${VERSION#v}" | ||
| - name: Commit supported-lines.json on main | ||
| env: | ||
| GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
| run: | | ||
| cp supported-lines.json /tmp/supported-lines.json | ||
| git config user.name "github-actions[bot]" | ||
| git config user.email "41898282+github-actions[bot]@users.noreply.github.com" | ||
| git fetch origin main | ||
| git checkout main | ||
| git pull origin main | ||
| cp /tmp/supported-lines.json supported-lines.json | ||
| git add supported-lines.json | ||
| if git diff --staged --quiet; then | ||
| echo "supported-lines.json unchanged" | ||
| else | ||
| git commit -m "chore: update supported-lines.json for ${GITHUB_REF#refs/tags/}" | ||
| git push origin main | ||
| fi | ||