Build Apple Music version #10
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 Apple Music version | |
on: [workflow_dispatch] | |
jobs: | |
build-apple-music: | |
runs-on: ubuntu-latest | |
permissions: | |
contents: write | |
steps: | |
- uses: actions/checkout@v3 | |
with: | |
ref: apple-music | |
path: main | |
- uses: actions/checkout@v3 | |
with: | |
ref: apple-music-build | |
path: apple-music-build | |
- uses: actions/setup-node@v3 | |
- uses: actions/cache@v3 | |
with: | |
path: '**/node_modules' | |
key: ${{ runner.os }}-modules-${{ hashFiles('**/yarn.lock') }} | |
- name: Install dependencies | |
working-directory: main | |
run: yarn install | |
- name: Build Apple Music version | |
working-directory: main | |
run: yarn build | |
- name: Copy build files to apple-music-build | |
working-directory: main | |
# Copy the dist folder, package.json, README and LICENSE to the apple-music-build directory | |
run: cp -r dist package.json README.md LICENSE ../apple-music-build | |
- name: Commit files | |
working-directory: apple-music-build | |
run: | | |
git config --local user.email "41898282+github-actions[bot]@users.noreply.github.com" | |
git config --local user.name "github-actions[bot]" | |
git add . | |
git commit -a -m "new-build: $(date -u)" | |
git push |