Skip to content

Commit

Permalink
ci: fix release workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
f0e committed Jan 18, 2024
1 parent d1dee97 commit 38b3f50
Show file tree
Hide file tree
Showing 2 changed files with 63 additions and 29 deletions.
63 changes: 63 additions & 0 deletions .github/workflows/build.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,63 @@
name: Build

on: [push]

permissions:
contents: write

jobs:
build:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v3

- name: Set up pnpm
uses: pnpm/action-setup@v2
with:
version: 8

- name: Set up Node.js
uses: actions/setup-node@v4
with:
node-version: lts/Iron
cache: 'pnpm'

- name: Bundle project
run: |
pnpm install
pnpm run build
- name: Upload
uses: actions/upload-artifact@v4
with:
name: mpv-cut
path: |
dist
release:
needs: build
if: ${{ startsWith(github.ref, 'refs/tags/') }}

runs-on: ubuntu-latest

steps:
- name: Download
uses: actions/download-artifact@v4
with:
name: mpv-cut
path: mpv-cut

- name: Install zip
run: sudo apt-get install -y zip/*

- name: Create archive
working-directory: ${{env.GITHUB_WORKSPACE}}
run: (cd mpv-cut && zip -r "$OLDPWD/mpv-cut.zip" .)

- name: Release
uses: softprops/action-gh-release@v1
with:
files: |
mpv-cut.zip
fail_on_unmatched_files: true
29 changes: 0 additions & 29 deletions .github/workflows/release.yaml

This file was deleted.

0 comments on commit 38b3f50

Please sign in to comment.