Skip to content

Commit

Permalink
Chore/npm publish auto (#43)
Browse files Browse the repository at this point in the history
* chore: make packages independent for lerna

* chore: create github workflow

* fix: remove caching

* fix: bump checkout version

* fix: add ref branch

* chore: add from-package flag

* Publish

 - @bam.tech/[email protected]
 - @bam.tech/[email protected]

* fix: from-package not a flag

* fix: replace NODE_AUTH_TOKEN with NPM_TOKEN

* chore: bump eslint-plugin version

* chore: up lerna log level

* chore: add bootstrap lerna job

* fix: add npmrc file writing job

* chore: changed event to push tags and branch to main
  • Loading branch information
P0labrD authored Aug 24, 2023
1 parent 70b43e7 commit 02d25cd
Show file tree
Hide file tree
Showing 5 changed files with 36 additions and 3 deletions.
32 changes: 32 additions & 0 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
name: Publish to npm

on:
push:
tags:
- "*"

jobs:
publish:
runs-on: ubuntu-latest

steps:
- name: Checkout code
uses: actions/checkout@v3
with:
ref: "main" # Replace with your branch name

- name: Use Node.js
uses: actions/setup-node@v3
with:
node-version-file: .nvmrc

- name: Install dependencies
run: yarn --immutable

- name: Set up .npmrc file
run: echo "//registry.npmjs.org/:_authToken=${{ secrets.NPM_TOKEN }}" > ~/.npmrc

- name: Publish to npm
run: npx lerna publish from-package --no-private --yes
env:
NPM_TOKEN: ${{secrets.NPM_TOKEN}}
1 change: 1 addition & 0 deletions .nvmrc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
18
2 changes: 1 addition & 1 deletion lerna.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"$schema": "node_modules/lerna/schemas/lerna-schema.json",
"useWorkspaces": true,
"version": "0.2.0"
"version": "independent"
}
2 changes: 1 addition & 1 deletion packages/eslint-plugin/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@bam.tech/eslint-plugin",
"version": "0.4.0",
"version": "0.4.2",
"description": "eslint plugin for bam projects",
"keywords": [
"eslint",
Expand Down
2 changes: 1 addition & 1 deletion packages/typescript-config/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@bam.tech/typescript-config",
"version": "0.3.0",
"version": "0.3.1",
"license": "MIT",
"peerDependencies": {
"expo": ">=47"
Expand Down

0 comments on commit 02d25cd

Please sign in to comment.