Skip to content

Commit 02d25cd

Browse files
authored
Chore/npm publish auto (#43)
* 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/eslint-plugin@0.4.1 - @bam.tech/typescript-config@0.3.1 * 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
1 parent 70b43e7 commit 02d25cd

5 files changed

Lines changed: 36 additions & 3 deletions

File tree

.github/workflows/publish.yml

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
name: Publish to npm
2+
3+
on:
4+
push:
5+
tags:
6+
- "*"
7+
8+
jobs:
9+
publish:
10+
runs-on: ubuntu-latest
11+
12+
steps:
13+
- name: Checkout code
14+
uses: actions/checkout@v3
15+
with:
16+
ref: "main" # Replace with your branch name
17+
18+
- name: Use Node.js
19+
uses: actions/setup-node@v3
20+
with:
21+
node-version-file: .nvmrc
22+
23+
- name: Install dependencies
24+
run: yarn --immutable
25+
26+
- name: Set up .npmrc file
27+
run: echo "//registry.npmjs.org/:_authToken=${{ secrets.NPM_TOKEN }}" > ~/.npmrc
28+
29+
- name: Publish to npm
30+
run: npx lerna publish from-package --no-private --yes
31+
env:
32+
NPM_TOKEN: ${{secrets.NPM_TOKEN}}

.nvmrc

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
18

lerna.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
{
22
"$schema": "node_modules/lerna/schemas/lerna-schema.json",
33
"useWorkspaces": true,
4-
"version": "0.2.0"
4+
"version": "independent"
55
}

packages/eslint-plugin/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@bam.tech/eslint-plugin",
3-
"version": "0.4.0",
3+
"version": "0.4.2",
44
"description": "eslint plugin for bam projects",
55
"keywords": [
66
"eslint",

packages/typescript-config/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@bam.tech/typescript-config",
3-
"version": "0.3.0",
3+
"version": "0.3.1",
44
"license": "MIT",
55
"peerDependencies": {
66
"expo": ">=47"

0 commit comments

Comments
 (0)