mirror of
https://github.com/lostpaul/obsidian-folder-notes.git
synced 2026-07-22 07:40:24 +00:00
Update and rename create-release-for-fv.yaml to build-and-push.yml
This commit is contained in:
parent
086c791a82
commit
7903068cc6
1 changed files with 12 additions and 16 deletions
|
|
@ -1,9 +1,6 @@
|
|||
name: Build and Push to Folder Overview
|
||||
|
||||
on:
|
||||
push:
|
||||
tags:
|
||||
- "[0-9]+.[0-9]+.[0-9]+"
|
||||
workflow_dispatch:
|
||||
inputs:
|
||||
tag:
|
||||
|
|
@ -17,25 +14,17 @@ jobs:
|
|||
- name: Checkout folder-notes
|
||||
uses: actions/checkout@v3
|
||||
with:
|
||||
repository: LostPaul/obsidian-folder-notes
|
||||
fetch-depth: 0
|
||||
submodules: recursive
|
||||
path: folder-notes
|
||||
|
||||
- name: Install dependencies
|
||||
run: |
|
||||
cd folder-notes
|
||||
npm install
|
||||
run: npm install
|
||||
|
||||
- name: Build folder-overview
|
||||
run: |
|
||||
cd folder-notes
|
||||
npm run fv-build # This will run esbuild.config.mjs
|
||||
run: npm run fv-build
|
||||
|
||||
- name: Verify build output
|
||||
run: |
|
||||
ls -la folder-notes/src/obsidian-folder-overview/
|
||||
ls -la folder-notes/dist/
|
||||
ls -la src/obsidian-folder-overview/
|
||||
|
||||
- name: Checkout folder-overview
|
||||
uses: actions/checkout@v3
|
||||
|
|
@ -47,8 +36,8 @@ jobs:
|
|||
|
||||
- name: Copy built files to folder-overview
|
||||
run: |
|
||||
cp folder-notes/src/obsidian-folder-overview/main.js \
|
||||
folder-notes/src/obsidian-folder-overview/styles.css folder-overview/
|
||||
cp src/obsidian-folder-overview/main.js \
|
||||
src/obsidian-folder-overview/styles.css folder-overview/
|
||||
|
||||
- name: Commit and push built files
|
||||
run: |
|
||||
|
|
@ -62,3 +51,10 @@ jobs:
|
|||
git commit -m "Add built files for release"
|
||||
git push origin main
|
||||
fi
|
||||
|
||||
- name: Trigger release on folder-overview
|
||||
run: |
|
||||
curl -X POST -H "Authorization: token ${{ secrets.PAT }}" \
|
||||
-H "Accept: application/vnd.github.v3+json" \
|
||||
https://api.github.com/repos/LostPaul/obsidian-folder-overview/actions/workflows/release.yml/dispatches \
|
||||
-d '{"ref": "main", "inputs": {"tag": "${{ github.event.inputs.tag }}"}}'
|
||||
Loading…
Reference in a new issue