Skip to content

Commit

Permalink
V1.0.0
Browse files Browse the repository at this point in the history
  • Loading branch information
rakheyl committed Sep 6, 2021
1 parent 404f351 commit 2dc2137
Show file tree
Hide file tree
Showing 6 changed files with 1,079 additions and 0 deletions.
50 changes: 50 additions & 0 deletions .github/workflows/npm-publish.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
# 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]

jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/setup-node@v2
with:
node-version: 14
- run: npm test

publish-gpr:
needs: build
runs-on: ubuntu-latest
permissions:
contents: read
packages: write
steps:
- uses: actions/checkout@v2
- uses: actions/setup-node@v2
with:
node-version: 14
- run: node -e "const fs=require('fs');const path=require('path');const pkg=require('./package.json');pkg.name='@rakheyl/'+pkg.name;fs.writeFileSync(path.join(__dirname,'./package.json'),JSON.stringify(pkg));"
- run: echo "//npm.pkg.github.com/:_authToken=${{ secrets.GITHUB_TOKEN }}" >> .npmrc
- run: npm run build
- run: npm publish --access public --registry=https://npm.pkg.github.com
env:
NPM_AUTH_TOKEN: ${{ secrets.GITHUB_TOKEN }}

publish-npm:
needs: [build, publish-gpr]
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/setup-node@v2
with:
node-version: 14
registry-url: "https://registry.npmjs.org"
- run: npm run build
- run: npm publish --access public
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_SECRET }}
Loading

0 comments on commit 2dc2137

Please sign in to comment.