Skip to content

Commit

Permalink
feat: add workflow to build apple-music and push to git
Browse files Browse the repository at this point in the history
  • Loading branch information
stijnvdkolk committed Jan 24, 2024
1 parent b56ddfe commit 4418d93
Showing 1 changed file with 43 additions and 0 deletions.
43 changes: 43 additions & 0 deletions .github/workflows/apple-music-build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
name: Build Apple Music version

on: [workflow_dispatch]

jobs:
build-apple-music:
runs-on: ubuntu-latest
permissions:
contents: write
steps:
- uses: actions/checkout@v3

- uses: actions/setup-node@v3

- uses: actions/cache@v3
with:
path: '**/node_modules'
key: ${{ runner.os }}-modules-${{ hashFiles('**/yarn.lock') }}

- name: Install dependencies
run: yarn install

- name: Build Apple Music version
run: yarn build

- name: Checkout to Apple Music Build
run: git checkout --orphan apple-music-build

- name: Remove all unneeded files
run: rm -rf node_modules src .gitignore yarn-error.log yarn.lock tsconfig.json .eslintrc.js .prettierrc.js .npmignore

- name: Commit files
run: |
git config --local user.email "41898282+github-actions[bot]@users.noreply.github.com"
git config --local user.name "github-actions[bot]"
git commit -a -m "new-build: $(date -u)"
- name: Push changes
uses: ad-m/github-push-action@master
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
force: true
branch: apple-music-build

0 comments on commit 4418d93

Please sign in to comment.