Skip to content

Commit

Permalink
Reintroduce a publish workflow
Browse files Browse the repository at this point in the history
Restore the publish workflow, except for the GH package registry
  • Loading branch information
daquinoaldo committed Feb 20, 2020
1 parent b2e6720 commit ac9c7ad
Showing 1 changed file with 59 additions and 0 deletions.
59 changes: 59 additions & 0 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,59 @@
name: publish

on: release

jobs:
test:
name: Test
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v1
- uses: actions/setup-node@v1
with:
node-version: 12
- run: npm ci
- run: npm test

build:
name: Build binaries
needs: test
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v1
- uses: actions/setup-node@v1
with:
node-version: 12
registry-url: https://registry.npmjs.org/
- name: npm run build
run: |
npm install
npm run build
- name: upload linux binary
uses: actions/upload-artifact@master
with:
name: https-localhost-linux
path: build
- name: upload macos binary
uses: actions/upload-artifact@master
with:
name: https-localhost-macos
path: build
- name: upload windows binary
uses: actions/upload-artifact@master
with:
name: https-localhost-win.exe
path: build

npm-publish:
name: Publish NPM
needs: test
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v1
- uses: actions/setup-node@v1
with:
node-version: 12
registry-url: https://registry.npmjs.org/
- run: npm publish
env:
NODE_AUTH_TOKEN: ${{secrets.NPM_TOKEN}}

0 comments on commit ac9c7ad

Please sign in to comment.