Skip to content

handle openrouter reasoning field #42

handle openrouter reasoning field

handle openrouter reasoning field #42

Workflow file for this run

name: Release Obsidian plugin
on:
push:
tags:
- '*'
env:
PLUGIN_NAME: obsidian-infio-copilot
permissions:
contents: write
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Use Node.js
uses: actions/setup-node@v1
with:
node-version: 20.x
- name: Build
id: build
run: |
npm install
npm install js-yaml
npm run build
- name: Test
id: test
run: |
npm run test
- name: Get Tag Name
id: get_tag
run: |
echo "tag_name=$(git tag --sort version:refname | tail -n 1)" >> $GITHUB_OUTPUT
- name: Bundle
id: bundle
run: |
mkdir ${{ env.PLUGIN_NAME }}
cp main.js manifest.json styles.css ${{ env.PLUGIN_NAME }}
zip -r ${{ env.PLUGIN_NAME }}-${{ steps.get_tag.outputs.tag_name }}.zip ${{ env.PLUGIN_NAME }}
ls
- name: Get release notes
id: release_notes
run: |
chmod +x .github/scripts/get-changelog.js
CHANGELOG=$(node .github/scripts/get-changelog.js ${{ steps.get_tag.outputs.tag_name }})
if [ -z "$CHANGELOG" ]; then
echo "Error: No release notes found for this version in CHANGELOG.md"
exit 1
fi
echo "changelog<<EOF" >> $GITHUB_OUTPUT
echo "$CHANGELOG" >> $GITHUB_OUTPUT
echo "EOF" >> $GITHUB_OUTPUT
- name: Release
uses: softprops/action-gh-release@v1
if: startsWith(github.ref, 'refs/tags/')
with:
token: ${{ github.token }}
files: |
${{ env.PLUGIN_NAME }}-${{ steps.get_tag.outputs.tag_name }}.zip
main.js
manifest.json
styles.css
body: ${{ steps.release_notes.outputs.changelog }}