Skip to content

Commit

Permalink
Adds action workflows
Browse files Browse the repository at this point in the history
  • Loading branch information
alexkar598 committed Mar 23, 2022
1 parent 05e556d commit f342517
Show file tree
Hide file tree
Showing 4 changed files with 73 additions and 3 deletions.
19 changes: 19 additions & 0 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
name: Publish Package to npmjs
on:
release:
types: [published]
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
# Setup .npmrc file to publish to npm
- uses: actions/setup-node@v2
with:
# We don't really use anything requiring anything newer than this
node-version: '16.x'
registry-url: 'https://registry.npmjs.org'
- run: npm ci
- run: npm publish
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
27 changes: 27 additions & 0 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
name: Run typescript compiler
on:
push:
branches-ignore:
# publish.yml will need to run the compiler anyways
- master
pull_request:

jobs:
build:
strategy:
fail-fast: true
matrix:
# All active LTS versions(12,14,16) + current(17)
node: [ 17, 16, 14, 12 ]

runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
# Setup .npmrc file to publish to npm
- uses: actions/setup-node@v2
with:
# We don't really use anything requiring anything newer than this
node-version: ${{ matrix.node }}
registry-url: 'https://registry.npmjs.org'
- run: npm ci
- run: npm run prepare
22 changes: 21 additions & 1 deletion package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

8 changes: 6 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,9 @@
"name": "http2byond",
"description": "Communication layer between node.js and BYOND game servers.",
"version": "3.0.0",
"scripts": {
"prepare": "npx tsc"
},
"contributors": [
{
"name": "Tigercat2000",
Expand All @@ -25,10 +28,11 @@
},
"files": [
"dist",
"types"
"typings"
],
"types": "typings/index.d.ts",
"devDependencies": {
"@types/node": "^17.0.22"
"@types/node": "^17.0.22",
"typescript": "^4.6.2"
}
}

0 comments on commit f342517

Please sign in to comment.