Add electron example #4
Workflow file for this run
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: Prebuild and package | |
on: | |
pull_request: | |
types: [closed] | |
branches: | |
- main | |
jobs: | |
prebuild-darwin: | |
if: ${{ github.event.pull_request.merged == true && (github.event.pull_request.title == 'Version Packages' || startsWith(github.event.pull_request.head.ref, 'changeset-release/')) }} | |
runs-on: macos-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: pnpm/action-setup@v4 | |
with: | |
version: 9 | |
- uses: actions/setup-node@v4 | |
with: | |
node-version: 20 | |
cache: 'pnpm' | |
- run: pnpm install --frozen-lockfile | |
- run: pnpm prebuild --arch x64 | |
- run: pnpm prebuild --arch arm64 | |
- uses: actions/upload-artifact@v3 | |
with: | |
name: darwin | |
path: prebuilds | |
build-package: | |
needs: | |
- prebuild-darwin | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: pnpm/action-setup@v4 | |
with: | |
version: 9 | |
- uses: actions/download-artifact@v3 | |
with: | |
name: darwin | |
path: prebuilds | |
- uses: actions/setup-node@v4 | |
with: | |
node-version: 20 | |
cache: 'pnpm' | |
- run: pnpm install --frozen-lockfile --ignore-scripts | |
- run: pnpm tsc | |
- name: Rename .gitignore for prebuild | |
run: | | |
mv .gitignore .gitignore.main | |
mv .gitignore.prebuild .gitignore | |
- name: Commit and push compiled assets | |
run: | | |
git config user.email "[email protected]" | |
git config user.name "Ryu Github Actions" | |
git add --all | |
git commit -m "Add compiled assets" | |
git push origin +HEAD:prebuild || echo "Failed to push changes" |