Skip to content

Commit

Permalink
issue-#57 - Added 'publish.yml' gh-action workflow file.
Browse files Browse the repository at this point in the history
- Bumped up packages/fjl/ package version.
  • Loading branch information
elycruz committed Sep 18, 2022
1 parent 1afb471 commit 849561c
Show file tree
Hide file tree
Showing 2 changed files with 40 additions and 1 deletion.
39 changes: 39 additions & 0 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
# 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
# and https://docs.github.com/en/actions/guides/publishing-nodejs-packages#publishing-packages-to-the-npm-registry .

name: Publish

on:
release:
types: [created]

jobs:
build-test-publish-to-npm:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/setup-node@v2
with:
node-version: 18
registry-url: https://registry.npmjs.org/
- run: npm ci
- run: npm publish
env:
NODE_AUTH_TOKEN: ${{secrets.NPM_TOKEN}}

build-test-publish-to-github-pkgs:
runs-on: ubuntu-latest
permissions:
contents: read
packages: write
steps:
- uses: actions/checkout@v2
- uses: actions/setup-node@v2
with:
node-version: 18
registry-url: https://npm.pkg.github.com/
- run: npm ci
- run: npm publish
env:
NODE_AUTH_TOKEN: ${{secrets.GITHUB_TOKEN}}
2 changes: 1 addition & 1 deletion packages/fjl/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "fjl",
"version": "2.0.0-alpha",
"version": "2.0.0-alpha.1",
"description": "Functional Javascript Library.",
"main": "dist/cjs/index.js",
"module": "dist/es/index.js",
Expand Down

0 comments on commit 849561c

Please sign in to comment.