Skip to content

Commit

Permalink
Initialize GitHub Workflows (#1)
Browse files Browse the repository at this point in the history
  • Loading branch information
ShawnCZek authored Nov 17, 2022
1 parent 3771b37 commit 33680f5
Show file tree
Hide file tree
Showing 2 changed files with 66 additions and 0 deletions.
32 changes: 32 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
name: CI

on:
pull_request:
paths:
- '**.json'
- '**.js'
- '**.ts'
push:
branches:
- main

jobs:
eslint:
name: ESLint Checks
runs-on: ubuntu-latest

steps:
- name: Checkout Repository
uses: actions/checkout@v3

- name: Install Node v18
uses: actions/setup-node@v3
with:
node-version: 18
cache: npm

- name: Install Dependencies
run: npm ci

- name: ESLint
run: npx eslint --ext .ts web/ traffic/
34 changes: 34 additions & 0 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
name: Publish Package

on:
workflow_dispatch:
release:
types: [created]

jobs:
publish_npmjs:
name: Publish Package to npmjs
runs-on: ubuntu-latest
if: github.repository_owner == 'TruckersMP'

steps:
- name: Checkout Repository
uses: actions/checkout@v3

- name: Install Node v18
uses: actions/setup-node@v3
with:
node-version: 18
cache: npm
registry-url: https://registry.npmjs.org

- name: Install Dependencies
run: npm ci

- name: Build
run: npm run build

- name: Publish
run: npm publish
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}

0 comments on commit 33680f5

Please sign in to comment.