Skip to content

Commit

Permalink
Messing around with GHA workflows
Browse files Browse the repository at this point in the history
  • Loading branch information
c032 committed Feb 7, 2024
1 parent 0294f67 commit 47b9d27
Show file tree
Hide file tree
Showing 4 changed files with 83 additions and 49 deletions.
22 changes: 0 additions & 22 deletions .github/workflows/lint.yml

This file was deleted.

81 changes: 81 additions & 0 deletions .github/workflows/push.yml
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
26 changes: 0 additions & 26 deletions .github/workflows/tests.yml

This file was deleted.

3 changes: 2 additions & 1 deletion tsconfig.json
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
}
}

0 comments on commit 47b9d27

Please sign in to comment.