build workflow
Some checks failed
Build / build (push) Failing after 1m9s

This commit is contained in:
Kyush 2026-06-06 22:33:55 +09:00
commit 715178b6df

View file

@ -0,0 +1,50 @@
name: Build
on:
push:
tags:
- 'v*'
workflow_dispatch:
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: pnpm/action-setup@v4
with:
version: 10
- uses: actions/setup-node@v4
with:
node-version: 20
cache: pnpm
- name: Install dependencies
run: pnpm install --frozen-lockfile
- name: Build
run: pnpm run build
- name: Copy artifact to release dir
if: startsWith(github.ref, 'refs/tags/')
run: |
mkdir -p dist/release
cp dist/m3u8-download.user.js dist/release/
- name: Create Release
if: startsWith(github.ref, 'refs/tags/')
uses: actions/forgejo-release@v2.12.1
with:
direction: upload
token: ${{ secrets.FORGEJO_TOKEN }}
tag: ${{ github.ref_name }}
title: Release ${{ github.ref_name }}
release-dir: dist/release
# - name: Upload artifact
# uses: actions/upload-artifact@v4
# with:
# name: m3u8-download.user.js
# path: dist/m3u8-download.user.js