Skip to content

Commit

Permalink
Added test workflow, updated package.json
Browse files Browse the repository at this point in the history
  • Loading branch information
inafact committed Apr 17, 2020
1 parent 7186fc3 commit 5013d1f
Show file tree
Hide file tree
Showing 2 changed files with 56 additions and 2 deletions.
47 changes: 47 additions & 0 deletions .github/workflows/beta-publish.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
# This workflow will run tests using node and then publish a package to GitHub Packages when a release is created
# For more information see: https://help.github.com/actions/language-and-framework-guides/publishing-nodejs-packages

name: Node.js Package - beta release

on:
release:
types: [prereleased]

jobs:
# build:
# runs-on: ubuntu-latest
# steps:
# - uses: actions/checkout@v2
# - uses: actions/setup-node@v1
# with:
# node-version: 12
# - run: npm ci

# publish-npm:
# needs: build
# runs-on: ubuntu-latest
# steps:
# - uses: actions/checkout@v2
# - uses: actions/setup-node@v1
# with:
# node-version: 12
# registry-url: https://registry.npmjs.org/
# - run: npm ci
# - run: npm publish
# env:
# NODE_AUTH_TOKEN: ${{secrets.npm_token}}

publish-gpr:
needs: build
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/setup-node@v1
with:
node-version: 12
registry-url: https://npm.pkg.github.com/
- run: npm ci
- run: npm build
- run: npm publish
env:
NODE_AUTH_TOKEN: ${{secrets.GITHUB_TOKEN}}
11 changes: 9 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "p-code",
"version": "1.0.0",
"name": "@p-code-magazine/p-code",
"version": "1.0.0-beta.0",
"description": "Implementation of P-Code",
"main": "dist/p-code.js",
"unpkg": "dist/p-code.js",
Expand All @@ -11,6 +11,9 @@
"README.md",
"LANGSPEC.md"
],
"keywords": [
"music", "esolang", "livecoding", "poetry", "programming"
],
"scripts": {
"build": "webpack --env.production && npm run example:build",
"example:serve": "cd example && webpack-dev-server --config webpack.dev.js",
Expand All @@ -37,5 +40,9 @@
},
"dependencies": {
"tone": "^13.8.25"
},
"publishConfig": {
"access": "public",
"registry": "https://npm.pkg.github.com/"
}
}

0 comments on commit 5013d1f

Please sign in to comment.