8000 前移rules常量 · dahaha-365/YaNet@3b9859d · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

build

build #217

Workflow file for this run

name: build
on:
schedule:
- cron: '0 23 * * *'
workflow_dispatch:
jobs:
build:
runs-on: ubuntu-latest
strategy:
matrix:
node-version: [20]
steps:
- name: Set variables
run: |
echo "BUILDTIME=$(TZ=Asia/Shanghai date +'%Y-%m-%d %H:%M')" >> $GITHUB_ENV
- uses: actions/checkout@v4
- name: Install pnpm
uses: pnpm/action-setup@v4
with:
version: 9
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node-version }}
cache: 'pnpm'
- name: Install dependencies
run: pnpm install
- name: Build
run: npx tsx ./tools/rulesets.ts
- name: Git push dist to "dist" branch
run: |
cd dist || exit 1
git init
git config user.name 'github-actions[bot]'
git config user.email 'github-actions[bot]@users.noreply.github.com'
git checkout -b dist
git add .
git commit -m "Released on ${{ env.BUILDTIME }}"
git remote add origin "https://${{ github.actor }}:${{ secrets.GITHUB_TOKEN }}@github.com/${{ github.repository }}"
git push -f -u origin dist
0