Skip to content

Release 1.1.4

Release 1.1.4 #39

Workflow file for this run

name: Release Obsidian plugin
on:
release:
types: [published]
env:
PLUGIN_NAME: obsidian-univer
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Setup pnpm
uses: pnpm/action-setup@v4
- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: 20
cache: pnpm
registry-url: ${{ secrets.VERDACCIO_URL }}
scope: '@univerjs-pro'
env:
NODE_AUTH_TOKEN: ${{ secrets.VERDACCIO_TOKEN }}
- name: Build
id: build
run: |
pnpm i
pnpm build
mkdir ${{ env.PLUGIN_NAME }}
echo "All build files are ready."
- name: Get latest release upload URL
id: get_latest_release
run: |
upload_url=$(gh release view --json uploadUrl -q .uploadUrl)
echo "upload_url=$upload_url" >> $GITHUB_OUTPUT
env:
GITHUB_TOKEN: ${{ secrets.GH_TOKEN }}
- name: Upload main.js
id: upload-main
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GH_TOKEN }}
with:
upload_url: ${{ steps.get_latest_release.outputs.upload_url }}
asset_path: ./dist/main.js
asset_name: main.js
asset_content_type: text/javascript
- name: Upload manifest.json
id: upload-manifest
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GH_TOKEN }}
with:
upload_url: ${{ steps.get_latest_release.outputs.upload_url }}
asset_path: ./dist/manifest.json
asset_name: manifest.json
asset_content_type: application/json
- name: Upload styles.css
id: upload-css
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GH_TOKEN }}
with:
upload_url: ${{ steps.get_latest_release.outputs.upload_url }}
asset_path: ./dist/styles.css
asset_name: styles.css
asset_content_type: text/css