ci: add release action

This commit is contained in:
sundevista 2025-05-17 13:58:33 +03:00
parent 1ef283cc30
commit 5e60c1da2b
6 changed files with 8635 additions and 3449 deletions

33
.github/workflows/release.yml vendored Normal file
View file

@ -0,0 +1,33 @@
name: Release plugin version
on:
workflow_dispatch:
permissions:
contents: read # for checkout
jobs:
release:
name: Release
runs-on: ubuntu-latest
permissions:
contents: write # to be able to publish a GitHub release
issues: write # to be able to comment on released issues
pull-requests: write # to be able to comment on released pull requests
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: 24
- name: Install dependencies
run: npm clean-install
env:
HUSKY: 0
- name: Build plugin
run: npm run build
- name: Release update
env:
GITHUB_TOKEN: ${{ secrets.GH_TOKEN }}
run: npx -p github:brianrodri/semantic-release-obsidian-plugin semantic-release

23
.releaserc.yml Normal file
View file

@ -0,0 +1,23 @@
# Boilerplate semantic-release configuration for an Obsidian plugin
# run semantic-release as follows to release a new version of your plugin:
# dry-run (default): npx -p github:brianrodri/semantic-release-obsidian-plugin semantic-release
# for real: npx -p github:brianrodri/semantic-release-obsidian-plugin semantic-release --dry-run false
# If `package.json` has a `repository` key configured, but you want to work on, say, a fork or development version on your own
# repository / user, you might have to specify the `repositoryUrl`:
# - either as a command-line argument (e.g. -r <url>) or by uncommenting and modifying the following line:
# repositoryUrl: https://github.com/<user>/<repository>
branches:
- main
- master
plugins:
- '@semantic-release/commit-analyzer'
- '@semantic-release/release-notes-generator'
- semantic-release-obsidian-plugin
- - '@semantic-release/github'
- assets:
- path: main.js
- path: manifest.json
- path: styles.css
tagFormat: '${version}'
ci: false
dryRun: true

8576
package-lock.json generated Normal file

File diff suppressed because it is too large Load diff

View file

@ -6,7 +6,8 @@
"scripts": {
"dev": "node esbuild.config.mjs",
"build": "tsc -noEmit -skipLibCheck && node esbuild.config.mjs production",
"version": "node version-bump.mjs && git add manifest.json versions.json"
"version": "node version-bump.mjs && git add manifest.json versions.json",
"sv-dry": "npx -p github:brianrodri/semantic-release-obsidian-plugin semantic-release --dry-run"
},
"keywords": [],
"author": "",
@ -19,7 +20,7 @@
"@typescript-eslint/parser": "8.32.1",
"builtin-modules": "5.0.0",
"esbuild": "0.25.4",
"obsidian": "latest",
"obsidian": "^1.8.7",
"semantic-release": "^24.2.4",
"tslib": "2.8.1",
"typescript": "5.8.3"

File diff suppressed because it is too large Load diff

View file

@ -1,2 +0,0 @@
onlyBuiltDependencies:
- esbuild