Skip to content

Commit

Permalink
build: reinstate npm publish
Browse files Browse the repository at this point in the history
  • Loading branch information
edd committed Jul 3, 2023
1 parent 9af833b commit 26188ad
Show file tree
Hide file tree
Showing 5 changed files with 40 additions and 34 deletions.
30 changes: 30 additions & 0 deletions .github/workflows/03-javascript-release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
name: publish

on:
push:
tags:
- "v[0-9]+.[0-9]+.[0-9]+"
- "v[0-9]+.[0-9]+.[0-9]+-alpha.[0-9]+"

jobs:
release:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3

- name: Use Node.js 18.x
uses: actions/setup-node@v3
with:
node-version: 18.x
registry-url: https://registry.npmjs.org/

- name: Install
run: npm install

- name: Test
run: npm test

- name: Push release to npm (public)
run: npm publish --access public .
env:
NODE_AUTH_TOKEN: ${{secrets.NPM_TOKEN}}
1 change: 1 addition & 0 deletions .npmignore
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
test
.github
.git
8 changes: 4 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ Scripts for producing a coverage matrix for Vega [specifications](https://github

```bash
# Use node
npx github:vegaprotocol/approbation
npx @vegaprotocol/approbation

# Or run the docker image
docker run ghcr.io/vegaprotocol/approbation:latest
Expand All @@ -27,7 +27,7 @@ All of the globs below are relatively simple - check out [globs primer](https://
### check-codes example
```bash
# Use node
npx github:vegaprotocol/approbation@latest check-filenames --specs="./specs-internal/protocol/**/*.{md,ipynb}" --show-branches
npx @vegaprotocol/approbation check-filenames --specs="./specs-internal/protocol/**/*.{md,ipynb}" --show-branches

# Or run the docker image
docker run -v "$(pwd):/run" ghcr.io/vegaprotocol/approbation:latest check-codes --specs="/run/specs-internal/protocol/**/*.{md,ipynb}" --show-branches
Expand All @@ -48,7 +48,7 @@ docker run -v "$(pwd):/run" ghcr.io/vegaprotocol/approbation:latest check-codes
### check-filenames example
```bash
# Use node
npx github:vegaprotocol/approbation@latest check-filenames codes --specs="./specs/protocol/**/*.{md,ipynb}" --tests="./MultisigControl/test/*.js" --ignore="./specs/protocol/{0001-*,0002-*,0004-*}" --show-branches
npx @vegaprotocol/approbation check-filenames codes --specs="./specs/protocol/**/*.{md,ipynb}" --tests="./MultisigControl/test/*.js" --ignore="./specs/protocol/{0001-*,0002-*,0004-*}" --show-branches

# Or run the docker image
docker run -v "$(pwd):/run" ghcr.io/vegaprotocol/approbation:latest check-filenames codes --specs="/run/specs/protocol/**/*.{md,ipynb}" --tests="/run/MultisigControl/test/*.js" --ignore="/run/specs/protocol/{0001-*,0002-*,0004-
Expand Down Expand Up @@ -141,7 +141,7 @@ Run `npm run setup` to configure your environment:
# Use in CI
```shell
# Use node
npx --silent --yes github:vegaprotocol/approbation
npx --silent --yes @vegaprotocol/approbation
# Or run the docker image
docker run ghcr.io/vegaprotocol/approbation:latest
Expand Down
26 changes: 2 additions & 24 deletions package-lock.json

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

9 changes: 3 additions & 6 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,15 +1,13 @@
{
"name": "@vegaprotocol/approbation",
"version": "4.3.1",
"version": "4.3.2",
"description": "Match Acceptance Criteria Codes with the tests that test them",
"engine": ">= 18",
"bin": "bin/approbation.js",
"bin": "./bin/approbation.js",
"scripts": {
"test:ci": "tape test/*.js",
"test": "tape test/*.js | tap-arc",
"lint": "standard **/*.js",
"setup": "husky install",
"build": "pkg ."
"lint": "standard **/*.js"
},
"repository": {
"type": "git",
Expand All @@ -22,7 +20,6 @@
},
"homepage": "https://github.com/vegaprotocol/approbation#readme",
"devDependencies": {
"husky": "8.0.3",
"standard": "^17.1.0",
"tap-arc": "0.3.5",
"tape": "5.6.3"
Expand Down

0 comments on commit 26188ad

Please sign in to comment.