chore(Actions): update workflows

This commit is contained in:
JellyBrick
2023-09-30 19:27:12 +09:00
parent 1067417dbd
commit e3d41ccb95

View File

@ -2,7 +2,7 @@ name: Build YouTube Music
on: on:
push: push:
branches: [ master ] branches: [ custom-version ]
pull_request: pull_request:
env: env:
@ -38,21 +38,21 @@ jobs:
# Build and release if it's the main repository # Build and release if it's the main repository
- name: Build and release on Mac - name: Build and release on Mac
if: startsWith(matrix.os, 'macOS') && github.repository == 'th-ch/youtube-music' if: startsWith(matrix.os, 'macOS') && github.repository == 'organization/youtube-music-next'
env: env:
GH_TOKEN: ${{ secrets.GH_TOKEN }} GH_TOKEN: ${{ secrets.GH_TOKEN }}
run: | run: |
npm run release:mac npm run release:mac
- name: Build and release on Linux - name: Build and release on Linux
if: startsWith(matrix.os, 'ubuntu') && github.repository == 'th-ch/youtube-music' if: startsWith(matrix.os, 'ubuntu') && github.repository == 'organization/youtube-music-next'
env: env:
GH_TOKEN: ${{ secrets.GH_TOKEN }} GH_TOKEN: ${{ secrets.GH_TOKEN }}
run: | run: |
npm run release:linux npm run release:linux
- name: Build and release on Windows - name: Build and release on Windows
if: startsWith(matrix.os, 'windows') && github.repository == 'th-ch/youtube-music' if: startsWith(matrix.os, 'windows') && github.repository == 'organization/youtube-music-next'
env: env:
GH_TOKEN: ${{ secrets.GH_TOKEN }} GH_TOKEN: ${{ secrets.GH_TOKEN }}
run: | run: |
@ -60,24 +60,24 @@ jobs:
# Only build without release if it is a fork # Only build without release if it is a fork
- name: Build on Mac - name: Build on Mac
if: startsWith(matrix.os, 'macOS') && github.repository != 'th-ch/youtube-music' if: startsWith(matrix.os, 'macOS') && github.repository != 'organization/youtube-music-next'
run: | run: |
npm run build:mac npm run build:mac
- name: Build on Linux - name: Build on Linux
if: startsWith(matrix.os, 'ubuntu') && github.repository != 'th-ch/youtube-music' if: startsWith(matrix.os, 'ubuntu') && github.repository != 'organization/youtube-music-next'
run: | run: |
npm run build:linux npm run build:linux
- name: Build on Windows - name: Build on Windows
if: startsWith(matrix.os, 'windows') && github.repository != 'th-ch/youtube-music' if: startsWith(matrix.os, 'windows') && github.repository != 'organization/youtube-music-next'
run: | run: |
npm run build:win npm run build:win
release: release:
runs-on: ubuntu-latest runs-on: ubuntu-latest
name: Release YouTube Music name: Release YouTube Music
if: github.repository == 'th-ch/youtube-music' && github.ref == 'refs/heads/master' if: github.repository == 'organization/youtube-music-next' && github.ref == 'refs/heads/master'
needs: build needs: build
steps: steps:
- uses: actions/checkout@v4 - uses: actions/checkout@v4
@ -107,7 +107,7 @@ jobs:
uses: cardinalby/git-get-release-action@v1 uses: cardinalby/git-get-release-action@v1
id: get_draft_release id: get_draft_release
env: env:
GITHUB_TOKEN: ${{ secrets.GH_TOKEN }} GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with: with:
latest: true latest: true
draft: true draft: true
@ -117,7 +117,7 @@ jobs:
if: ${{ env.VERSION_HASH == '' }} if: ${{ env.VERSION_HASH == '' }}
uses: irongut/EditRelease@v1.2.0 uses: irongut/EditRelease@v1.2.0
with: with:
token: ${{ secrets.GH_TOKEN }} token: ${{ secrets.GITHUB_TOKEN }}
id: ${{ steps.get_draft_release.outputs.id }} id: ${{ steps.get_draft_release.outputs.id }}
draft: false draft: false
prerelease: false prerelease: false
@ -125,7 +125,7 @@ jobs:
name: ${{ env.VERSION_TAG }} name: ${{ env.VERSION_TAG }}
replacebody: true replacebody: true
body: | body: |
See [changelog](https://github.com/th-ch/youtube-music/blob/master/changelog.md#${{ env.CHANGELOG_ANCHOR }}) for the list of updates and the full diff. See [changelog](https://github.com/organization/youtube-music-next/blob/master/changelog.md#${{ env.CHANGELOG_ANCHOR }}) for the list of updates and the full diff.
Thanks to all contributors! 🏅 Thanks to all contributors! 🏅