mirror of
https://github.com/th-ch/youtube-music.git
synced 2026-01-16 20:52:06 +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:
|
with:
|
||||||
run: yarn test
|
run: yarn test
|
||||||
|
|
||||||
- name: Build on Mac
|
# Build and release if it's the main repository
|
||||||
if: startsWith(matrix.os, 'macOS')
|
- name: Build and release on Mac
|
||||||
|
if: startsWith(matrix.os, 'macOS') && github.repository == 'th-ch/youtube-music'
|
||||||
env:
|
env:
|
||||||
GH_TOKEN: ${{ secrets.GH_TOKEN }}
|
GH_TOKEN: ${{ secrets.GH_TOKEN }}
|
||||||
run: |
|
run: |
|
||||||
yarn run release:mac
|
yarn run release:mac
|
||||||
|
|
||||||
- name: Build on Linux
|
- name: Build and release on Linux
|
||||||
if: startsWith(matrix.os, 'ubuntu')
|
if: startsWith(matrix.os, 'ubuntu') && github.repository == 'th-ch/youtube-music'
|
||||||
env:
|
env:
|
||||||
GH_TOKEN: ${{ secrets.GH_TOKEN }}
|
GH_TOKEN: ${{ secrets.GH_TOKEN }}
|
||||||
run: |
|
run: |
|
||||||
yarn run release:linux
|
yarn run release:linux
|
||||||
|
|
||||||
- name: Build on Windows
|
- name: Build and release on Windows
|
||||||
if: startsWith(matrix.os, 'windows')
|
if: startsWith(matrix.os, 'windows') && github.repository == 'th-ch/youtube-music'
|
||||||
env:
|
env:
|
||||||
GH_TOKEN: ${{ secrets.GH_TOKEN }}
|
GH_TOKEN: ${{ secrets.GH_TOKEN }}
|
||||||
run: |
|
run: |
|
||||||
yarn run release:win
|
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:
|
release:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
name: Release YouTube Music
|
name: Release YouTube Music
|
||||||
if: github.ref == 'refs/heads/master'
|
if: github.repository == 'th-ch/youtube-music' && github.ref == 'refs/heads/master'
|
||||||
needs: build
|
needs: build
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v3
|
- uses: actions/checkout@v3
|
||||||
|
|||||||
Reference in New Issue
Block a user