mirror of
https://github.com/LLOneBot/LLOneBot.git
synced 2024-11-22 01:56:33 +00:00
44 lines
962 B
YAML
44 lines
962 B
YAML
name: Publish
|
|
on:
|
|
push:
|
|
tags:
|
|
- 'v*'
|
|
|
|
jobs:
|
|
build-and-publish:
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- name: Checkout
|
|
uses: actions/checkout@v4
|
|
|
|
- name: Setup node
|
|
uses: actions/setup-node@v4
|
|
with:
|
|
node-version: 20
|
|
|
|
- name: Install dependenies
|
|
run: |
|
|
export ELECTRON_SKIP_BINARY_DOWNLOAD=1
|
|
npm install
|
|
|
|
- name: Build
|
|
run: npm run build
|
|
|
|
- name: Compress
|
|
run: |
|
|
sudo apt install zip -y
|
|
cd ./dist/
|
|
zip -r ../LLOneBot.zip ./*
|
|
|
|
- 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
|
|
with:
|
|
artifacts: 'LLOneBot.zip'
|
|
draft: true
|
|
token: ${{ secrets.RELEASE_TOKEN }}
|
|
name: LLOneBot v${{ steps.get-version.outputs.VERSION }}
|