mirror of
https://github.com/fancive/obsidian-parallel-reader.git
synced 2026-07-22 17:20:24 +00:00
On tag push (e.g. 1.0.7), builds from source, runs typecheck + tests, then creates a GitHub Release with main.js, main.js.map, manifest.json, and styles.css attached. This replaces the need to commit main.js to the repository. Change-Id: I8ccbdddaa45267d2738cc43a4e7fccd1d35346ab
42 lines
771 B
YAML
42 lines
771 B
YAML
name: Release
|
|
|
|
on:
|
|
push:
|
|
tags:
|
|
- '[0-9]+.[0-9]+.[0-9]+'
|
|
|
|
permissions:
|
|
contents: write
|
|
|
|
jobs:
|
|
release:
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
|
|
- uses: actions/setup-node@v4
|
|
with:
|
|
node-version: 22
|
|
cache: npm
|
|
|
|
- run: npm ci
|
|
|
|
- name: Build
|
|
run: npm run build
|
|
|
|
- name: Typecheck
|
|
run: npm run typecheck
|
|
|
|
- name: Test
|
|
run: npm run test:only
|
|
|
|
- name: Create Release
|
|
env:
|
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
|
run: |
|
|
tag="${GITHUB_REF#refs/tags/}"
|
|
gh release create "$tag" \
|
|
--title "$tag" \
|
|
--generate-notes \
|
|
main.js main.js.map manifest.json styles.css
|