mirror of
https://github.com/LLOneBot/LLOneBot.git
synced 2024-11-22 01:56:33 +00:00
optimize: ci
This commit is contained in:
parent
abcec99ce0
commit
e03b82fb44
19
.github/workflows/publish.yml
vendored
19
.github/workflows/publish.yml
vendored
@ -1,4 +1,4 @@
|
|||||||
name: 'publish'
|
name: Publish
|
||||||
on:
|
on:
|
||||||
push:
|
push:
|
||||||
tags:
|
tags:
|
||||||
@ -8,31 +8,36 @@ jobs:
|
|||||||
build-and-publish:
|
build-and-publish:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- name: checkout
|
- name: Checkout
|
||||||
uses: actions/checkout@v4
|
uses: actions/checkout@v4
|
||||||
|
|
||||||
- name: setup node
|
- name: Setup node
|
||||||
uses: actions/setup-node@v4
|
uses: actions/setup-node@v4
|
||||||
with:
|
with:
|
||||||
node-version: 20
|
node-version: 20
|
||||||
|
|
||||||
- name: install dependenies
|
- name: Install dependenies
|
||||||
run: |
|
run: |
|
||||||
export ELECTRON_SKIP_BINARY_DOWNLOAD=1
|
export ELECTRON_SKIP_BINARY_DOWNLOAD=1
|
||||||
npm install
|
npm install
|
||||||
|
|
||||||
- name: build
|
- name: Build
|
||||||
run: npm run build
|
run: npm run build
|
||||||
|
|
||||||
- name: zip
|
- name: Compress
|
||||||
run: |
|
run: |
|
||||||
sudo apt install zip -y
|
sudo apt install zip -y
|
||||||
cd ./dist/
|
cd ./dist/
|
||||||
zip -r ../LLOneBot.zip ./*
|
zip -r ../LLOneBot.zip ./*
|
||||||
|
|
||||||
- name: publish
|
- name: Extract version from tag
|
||||||
|
id: get-version
|
||||||
|
run: echo "VERSION=${GITHUB_REF#refs/tags/v}" >> "$GITHUB_OUTPUT"
|
||||||
|
|
||||||
|
- name: Release
|
||||||
uses: ncipollo/release-action@v1
|
uses: ncipollo/release-action@v1
|
||||||
with:
|
with:
|
||||||
artifacts: 'LLOneBot.zip'
|
artifacts: 'LLOneBot.zip'
|
||||||
draft: true
|
draft: true
|
||||||
token: ${{ secrets.RELEASE_TOKEN }}
|
token: ${{ secrets.RELEASE_TOKEN }}
|
||||||
|
name: LLOneBot v${{ steps.get-version.outputs.VERSION }}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user