-
Notifications
You must be signed in to change notification settings - Fork 95
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Update build process to use one branch system * Update CONTRIBUTING.md to use master branch not dev - Also mention JS files must be manually updated when PR from fork * Added comments to the build process * Updating JS files Co-authored-by: akwanpdf <[email protected]> Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
- Loading branch information
1 parent
9961496
commit 4a476e9
Showing
2 changed files
with
12 additions
and
10 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,8 @@ | ||
name: Transpile TS | ||
|
||
on: | ||
push: | ||
branches: [dev] # <-- Change this to the primary branch (for example, "dev" if you want all changes to `dev` to be watched). | ||
pull_request: | ||
branches: [master] | ||
|
||
jobs: | ||
build: | ||
|
@@ -13,6 +13,7 @@ jobs: | |
with: | ||
persist-credentials: false # otherwise, the token used is the GITHUB_TOKEN, instead of your personal token. | ||
fetch-depth: 0 # otherwise, you will failed to push refs to dest repo. | ||
ref: ${{ github.event.pull_request.head.sha }} # checks out the branch being merged into `master` | ||
|
||
- name: Install dependencies | ||
run: | | ||
|
@@ -25,7 +26,7 @@ jobs: | |
cache: 'npm' | ||
|
||
- name: Build JavaScript files | ||
run: | # Change last line to your build script command #. | ||
run: | # Change line to your build script command. | ||
npm run start | ||
- name: Force add JS files to override .gitignore | ||
|
@@ -35,11 +36,10 @@ jobs: | |
run: | # Change last line to your preferred commit message (I like `chore: build js files`). | ||
git config --local user.email "41898282+github-actions[bot]@users.noreply.github.com" | ||
git config --local user.name "github-actions[bot]" | ||
git commit -m "Updating JS files" -a | ||
git commit -m "Updating JS files" -a || echo "No commit needed. JS files are already up-to-date" | ||
- name: Push changes | ||
uses: ad-m/[email protected] | ||
with: | ||
force: true | ||
github_token: ${{ secrets.GITHUB_TOKEN }} | ||
branch: master # <-- Change this to the branch where you want builds to be (for example, "master" if you want changes to the primary branch to be applied to `master`). | ||
branch: ${{ github.event.pull_request.head.ref }} # pushes the commit to the branch being merged into `master` |
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