Skip to content

Commit

Permalink
ci; preparing release to GH packages
Browse files Browse the repository at this point in the history
  • Loading branch information
lostfields committed Aug 10, 2021
1 parent 1e821ef commit 04aec46
Show file tree
Hide file tree
Showing 5 changed files with 663 additions and 75 deletions.
28 changes: 28 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
on:
push:
branches:
- '**'
tags-ignore:
- '*.*'

name: build

jobs:
build:
runs-on: ubuntu-latest
steps:
- name: checkout
uses: actions/checkout@v2
- name: setup
uses: actions/setup-node@v1
with:
node-version: 12
- name: build project
run: |
npm ci
npm run build
npm test
env:
CI: true
NODE_AUTH_TOKEN: ${{secrets.GITHUB_TOKEN}}
NPM_TFSO_TOKEN: ${{secrets.NPM_TFSO_TOKEN}}
73 changes: 42 additions & 31 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -1,49 +1,60 @@
# 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

on:
release:
types: [created]

name: release

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

# 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}}
node-version: 12
- name: build project
run: |
npm ci
npm run build
npm test
env:
CI: true
NODE_AUTH_TOKEN: ${{secrets.GITHUB_TOKEN}}
NPM_TFSO_TOKEN: ${{secrets.NPM_TFSO_TOKEN}}
- name: upload artifact
uses: actions/[email protected]
with:
name: artifact
path: |
lib/
src/
package.json
README.md
LICENSE
publish-gpr:
publish-github:
name: publish npm to github
if: "!github.event.release.prerelease" # https://developer.github.com/v3/activity/events/types/#releaseevent
needs: build
runs-on: ubuntu-latest
permissions:
contents: read
packages: write
steps:
- uses: actions/checkout@v2
- uses: actions/setup-node@v1
- name: download artifact
uses: actions/[email protected]
with:
name: artifact
- name: setup
uses: actions/setup-node@v1
with:
node-version: 12
registry-url: https://npm.pkg.github.com/
- run: npm ci
- run: npm publish
- name: publish
run: |
npm publish
env:
NODE_AUTH_TOKEN: ${{secrets.GITHUB_TOKEN}}
39 changes: 0 additions & 39 deletions appveyor.yml

This file was deleted.

Loading

0 comments on commit 04aec46

Please sign in to comment.