Skip to content

Commit

Permalink
cfg yml pub; semver autoincr
Browse files Browse the repository at this point in the history
  • Loading branch information
ebenali committed Jan 15, 2024
1 parent 112372a commit 95fec5f
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 5 deletions.
15 changes: 11 additions & 4 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
@@ -1,17 +1,19 @@
name: Node.js Package

on:
push:
branches: [main]
release:
types: [created]

jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- uses: actions/setup-node@v3
with:
node-version: 21
node-version: "21.x"
- run: corepack enable && yarn install
- run: yarn build

Expand All @@ -22,12 +24,17 @@ jobs:
contents: read
packages: write
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- uses: actions/setup-node@v3
with:
node-version: 21
node-version: "21.x"
registry-url: https://npm.pkg.github.com/
scope: "@MoreChickenDelivered"
- run: corepack enable
- run: git config --global user.email "[email protected]" && git config --global user.name "$GITHUB_ACTOR"
- run: yarn version --minor
- run: git push --tags && git push
- run: yarn publish
- run: yarn npm publish
env:
NODE_AUTH_TOKEN: ${{secrets.GITHUB_TOKEN}}
4 changes: 4 additions & 0 deletions .yarnrc.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
npmScopes:
esp-code:
npmAlwaysAuth: true
npmAuthToken: "${NPM_AUTH_TOKEN}"
5 changes: 4 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -39,5 +39,8 @@
},
"files": [
"index.d.ts"
]
],
"publishConfig": {
"registry": "https://npm.pkg.github.com"
}
}

0 comments on commit 95fec5f

Please sign in to comment.