-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
4 changed files
with
83 additions
and
49 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
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 |
---|---|---|
@@ -0,0 +1,81 @@ | ||
name: "push" | ||
|
||
on: | ||
workflow_dispatch: | ||
push: | ||
branches: | ||
- "main" | ||
|
||
jobs: | ||
run-tests: | ||
runs-on: "ubuntu-latest" | ||
steps: | ||
- name: "Checkout" | ||
uses: "actions/checkout@v3" | ||
|
||
- name: "Install dependencies." | ||
run: | | ||
npm ci | ||
- name: "Build." | ||
run: | | ||
npm run build | ||
- name: "Run tests." | ||
run: | | ||
npm run test | ||
run-linter: | ||
runs-on: "ubuntu-latest" | ||
steps: | ||
- name: "Checkout" | ||
uses: "actions/checkout@v3" | ||
|
||
- name: "Install dependencies." | ||
run: | | ||
npm ci | ||
- name: "Lint." | ||
run: | | ||
npm run lint | ||
publish: | ||
runs-on: "ubuntu-latest" | ||
needs: | ||
- "run-linter" | ||
- "run-tests" | ||
|
||
steps: | ||
- name: "Checkout" | ||
uses: "actions/checkout@v2" | ||
with: | ||
ref: "js" | ||
|
||
- name: "Create worktree from `main` branch." | ||
run: | | ||
git worktree add worktree-main main | ||
- name: "Build worktree." | ||
run: | | ||
cd worktree-main | ||
npm ci | ||
npm run build | ||
- name: "Move built files." | ||
run: | | ||
mv -v worktree-main/build/* . | ||
- name: "Remove worktree." | ||
run: | | ||
git worktree remove -f worktree-main main | ||
- name: "`git config`" | ||
run: | | ||
git config user.name "GitHub Actions" | ||
git config user.email "<>" | ||
- name: "Commit and push" | ||
run: | | ||
git add --all -v | ||
git commit -m 'Update' | ||
git push origin main |
This file was deleted.
Oops, something went wrong.
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,6 +1,7 @@ | ||
{ | ||
"extends": "node-base-typescript", | ||
"compilerOptions": { | ||
"outDir": "./build" | ||
"outDir": "./build", | ||
"declaration": true | ||
} | ||
} |