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 02e4f27
Show file tree
Hide file tree
Showing 2 changed files with 95 additions and 29 deletions.
50 changes: 50 additions & 0 deletions .github/workflows/build.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
name: Build

on: [push]

env:
is_tag: ${{ startsWith(github.ref, 'refs/tags/') }}

jobs:
publish:
runs-on: ubuntu-latest

strategy:
matrix:
node-version: ['lts']

steps:
- uses: actions/checkout@v3

- name: Set up Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node-version }}
cache: 'pnpm'

- name: Bundle project
run: |
pnpm install
pnpm run build
- name: Install zip
run: sudo apt-get install -y zip

- name: Create archive
working-directory: ${{env.GITHUB_WORKSPACE}}
run: zip -r mpv-cut.zip dist

- name: Upload
uses: actions/upload-artifact@v4
with:
name: mpv-cut
path: |
mpv-cut.zip
- name: Release
uses: softprops/action-gh-release@v1
if: ${{ env.is_tag == 'true' }}
with:
files: |
mpv-cut.zip
fail_on_unmatched_files: true
74 changes: 45 additions & 29 deletions .github/workflows/release.yaml
Original file line number Diff line number Diff line change
@@ -1,29 +1,45 @@
name: Create Release

on:
push:
tags:
- '*'

permissions:
contents: write

jobs:
publish:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3

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

- name: Create archive
working-directory: ${{env.GITHUB_WORKSPACE}}
run: zip -r mpv-cut.zip scripts script-opts

- name: Release
uses: softprops/action-gh-release@v1
with:
files: |
mpv-cut.zip
fail_on_unmatched_files: true
name: Create Release

on:
push:
tags:
- '*'

permissions:
contents: write

jobs:
publish:
runs-on: ubuntu-latest

strategy:
matrix:
node-version: ['lts']

steps:
- uses: actions/checkout@v3

- name: Set up Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node-version }}
cache: 'pnpm'

- name: Bundle project
run: |
pnpm install
pnpm run build
- name: Install zip
run: sudo apt-get install -y zip

- name: Create archive
working-directory: ${{env.GITHUB_WORKSPACE}}
run: zip -r mpv-cut.zip dist

- name: Release
uses: softprops/action-gh-release@v1
with:
files: |
mpv-cut.zip
fail_on_unmatched_files: true

0 comments on commit 02e4f27

Please sign in to comment.