47 lines
1.3 KiB
YAML
47 lines
1.3 KiB
YAML
# This is a basic workflow to help you get started with Actions
|
|
|
|
name: Release
|
|
|
|
env:
|
|
PLUGIN_NAME: logseq-plugin-favorite-tree
|
|
|
|
# Controls when the workflow will run
|
|
on: [push]
|
|
|
|
# A workflow run is made up of one or more jobs that can run sequentially or in parallel
|
|
jobs:
|
|
release:
|
|
# The type of runner that the job will run on
|
|
runs-on: ubuntu-latest
|
|
|
|
# Steps represent a sequence of tasks that will be executed as part of the job
|
|
steps:
|
|
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
|
|
- uses: actions/checkout@v3
|
|
- uses: actions/setup-node@v3
|
|
with:
|
|
node-version: "16.x"
|
|
- uses: pnpm/action-setup@v2.2.4
|
|
with:
|
|
version: 6.0.2
|
|
|
|
- name: Build
|
|
id: build
|
|
run: |
|
|
npx pnpm i -g pnpm@latest
|
|
pnpm install
|
|
pnpm build
|
|
mkdir ${{ env.PLUGIN_NAME }}
|
|
cp README.md package.json icon.png ${{ env.PLUGIN_NAME }}
|
|
mv dist ${{ env.PLUGIN_NAME }}
|
|
zip -r ${{ env.PLUGIN_NAME }}.zip ${{ env.PLUGIN_NAME }}
|
|
ls
|
|
echo "::set-output name=tag_name::$(git tag --sort version:refname | tail -n 1)"
|
|
|
|
- name: Upload zip file
|
|
id: upload_zip
|
|
uses: actions/upload-artifact@v4
|
|
with:
|
|
name: ${{ env.PLUGIN_NAME }}
|
|
path: ./${{ env.PLUGIN_NAME }}.zip
|