Skip to content

fix(CI): the artifacts #19

fix(CI): the artifacts

fix(CI): the artifacts #19

Workflow file for this run

name: Release Monkey Script and webapp
on:
workflow_dispatch:
push:
tags:
- 'v*.*.*'
jobs:
setup-and-build:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Install Node.js
uses: actions/setup-node@v4
with:
node-version: 20
- uses: pnpm/action-setup@v3
name: Install pnpm
with:
version: 8
run_install: false
- name: Get pnpm store directory
shell: bash
run: |
echo "STORE_PATH=$(pnpm store path --silent)" >> $GITHUB_ENV
- uses: actions/cache@v4
name: Setup pnpm cache
with:
path: ${{ env.STORE_PATH }}
key: ${{ runner.os }}-pnpm-store-${{ hashFiles('**/pnpm-lock.yaml') }}
restore-keys: |
${{ runner.os }}-pnpm-store-
- name: Install monkey
run: pnpm install:monkey
- name: build monkey
run: pnpm build:monkey
- name: Install Web
run: pnpm install:web
- name: build web
run: pnpm build:web
- name: zip and copy files
run: pnpm release
- name: upload monkey
uses: actions/upload-artifact@v4
with:
name: weibo-archiver.user.js
path: dist/weibo-archiver.user.js
- name: upload web
uses: actions/upload-artifact@v4
with:
name: weibo-archiver-webapp
path: dist/weibo-archiver-webapp.zip
- name: upload scripts
uses: actions/upload-artifact@v4
with:
name: weibo-archiver-scripts
path: dist/weibo-archiver-scripts.zip
darft-release:
runs-on: ubuntu-latest
permissions:
contents: write
needs: setup-and-build
steps:
- uses: actions/checkout@v4
- uses: actions/download-artifact@v4
with:
path: weibo-archiver-release
merge-multiple: true
- run: ls -R weibo-archiver-release
- uses: ncipollo/release-action@v1
with:
omitBodyDuringUpdate: true
omitNameDuringUpdate: true
omitPrereleaseDuringUpdate: true
allowUpdates: true
artifacts: weibo-archiver-release/*
draft: true
bodyFile: .github/release.md
token: ${{ secrets.GITHUB_TOKEN }}