mirror of
https://github.com/andre482/O-tie.git
synced 2026-07-22 07:44:11 +00:00
Restrict the release workflow to semver tags without a v prefix so manifest.json and GitHub releases stay aligned. Co-authored-by: Cursor <cursoragent@cursor.com>
44 lines
1.1 KiB
YAML
44 lines
1.1 KiB
YAML
name: Release
|
|
|
|
# Obsidian Community Plugins require the GitHub tag to match manifest.json
|
|
# exactly (e.g. 1.0.1 — not v1.0.1).
|
|
# Create releases with: git tag 1.0.1 && git push origin 1.0.1
|
|
|
|
on:
|
|
push:
|
|
tags:
|
|
- "[0-9]+.[0-9]+.[0-9]+"
|
|
|
|
jobs:
|
|
build:
|
|
runs-on: ubuntu-latest
|
|
permissions:
|
|
contents: write
|
|
id-token: write
|
|
attestations: write
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
- uses: actions/setup-node@v4
|
|
with:
|
|
node-version: 20
|
|
- run: npm ci
|
|
- run: npm run build
|
|
- name: Attest plugin artifacts
|
|
uses: actions/attest-build-provenance@v2
|
|
with:
|
|
subject-path: |
|
|
main.js
|
|
manifest.json
|
|
styles.css
|
|
- name: Delete existing release
|
|
env:
|
|
GH_TOKEN: ${{ github.token }}
|
|
run: gh release delete "${{ github.ref_name }}" --yes || true
|
|
- name: Create release
|
|
uses: softprops/action-gh-release@v2
|
|
with:
|
|
generate_release_notes: true
|
|
files: |
|
|
main.js
|
|
manifest.json
|
|
styles.css
|