ci: fix release workflow #8
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Build | ||
on: [push] | ||
env: | ||
is_tag: ${{ startsWith(github.ref, 'refs/tags/') }} | ||
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: ${{ env.is_tag }} | ||
Check failure on line 40 in .github/workflows/build.yaml GitHub Actions / BuildInvalid workflow file
|
||
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 |