name: Build on: push: tags: - 'v*' workflow_dispatch: jobs: build: runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 - uses: pnpm/action-setup@v4 - 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