mirror of
https://github.com/th-ch/youtube-music.git
synced 2026-01-10 10:11:46 +00:00
Merge pull request #1023 from th-ch/build-without-release-in-forks
Build without release in forks
This commit is contained in:
31
.github/workflows/build.yml
vendored
31
.github/workflows/build.yml
vendored
@ -65,31 +65,48 @@ jobs:
|
||||
with:
|
||||
run: yarn test
|
||||
|
||||
- name: Build on Mac
|
||||
if: startsWith(matrix.os, 'macOS')
|
||||
# Build and release if it's the main repository
|
||||
- name: Build and release on Mac
|
||||
if: startsWith(matrix.os, 'macOS') && github.repository == 'th-ch/youtube-music'
|
||||
env:
|
||||
GH_TOKEN: ${{ secrets.GH_TOKEN }}
|
||||
run: |
|
||||
yarn run release:mac
|
||||
|
||||
- name: Build on Linux
|
||||
if: startsWith(matrix.os, 'ubuntu')
|
||||
- name: Build and release on Linux
|
||||
if: startsWith(matrix.os, 'ubuntu') && github.repository == 'th-ch/youtube-music'
|
||||
env:
|
||||
GH_TOKEN: ${{ secrets.GH_TOKEN }}
|
||||
run: |
|
||||
yarn run release:linux
|
||||
|
||||
- name: Build on Windows
|
||||
if: startsWith(matrix.os, 'windows')
|
||||
- name: Build and release on Windows
|
||||
if: startsWith(matrix.os, 'windows') && github.repository == 'th-ch/youtube-music'
|
||||
env:
|
||||
GH_TOKEN: ${{ secrets.GH_TOKEN }}
|
||||
run: |
|
||||
yarn run release:win
|
||||
|
||||
# Only build without release if it is a fork
|
||||
- name: Build on Mac
|
||||
if: startsWith(matrix.os, 'macOS') && github.repository != 'th-ch/youtube-music'
|
||||
run: |
|
||||
yarn run build:mac
|
||||
|
||||
- name: Build on Linux
|
||||
if: startsWith(matrix.os, 'ubuntu') && github.repository != 'th-ch/youtube-music'
|
||||
run: |
|
||||
yarn run build:linux
|
||||
|
||||
- name: Build on Windows
|
||||
if: startsWith(matrix.os, 'windows') && github.repository != 'th-ch/youtube-music'
|
||||
run: |
|
||||
yarn run build:win
|
||||
|
||||
release:
|
||||
runs-on: ubuntu-latest
|
||||
name: Release YouTube Music
|
||||
if: github.ref == 'refs/heads/master'
|
||||
if: github.repository == 'th-ch/youtube-music' && github.ref == 'refs/heads/master'
|
||||
needs: build
|
||||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
|
||||
Reference in New Issue
Block a user