Modify action.

This commit is contained in:
reichtum 2024-12-20 11:10:54 +08:00
parent 20dea0661c
commit dbfb1272ca

View File

@ -6,13 +6,7 @@ env:
PLUGIN_NAME: logseq-plugin-favorite-tree
# Controls when the workflow will run
on:
push:
tags:
- "*" # Push events to matching any tag format, i.e. 1.0, 20.15.10
# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:
on: [push]
# A workflow run is made up of one or more jobs that can run sequentially or in parallel
jobs:
@ -43,25 +37,9 @@ jobs:
ls
echo "::set-output name=tag_name::$(git tag --sort version:refname | tail -n 1)"
- name: Create Release
id: create_release
uses: actions/create-release@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
VERSION: ${{ github.ref }}
with:
tag_name: ${{ github.ref }}
release_name: ${{ github.ref }}
draft: false
prerelease: false
- name: Upload zip file
id: upload_zip
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
uses: actions/upload-artifact@v4
with:
upload_url: ${{ steps.create_release.outputs.upload_url }}
asset_path: ./${{ env.PLUGIN_NAME }}.zip
asset_name: ${{ env.PLUGIN_NAME }}-${{ steps.build.outputs.tag_name }}.zip
asset_content_type: application/zip
name: ${{ env.PLUGIN_NAME }}
path: ./${{ env.PLUGIN_NAME }}.zip