Skip to content

Commit

Permalink
ci: publish to npmjs (#353)
Browse files Browse the repository at this point in the history
  • Loading branch information
morremeyer authored Mar 2, 2024
1 parent 5e8b806 commit 501cd97
Show file tree
Hide file tree
Showing 4 changed files with 18 additions and 26 deletions.
11 changes: 4 additions & 7 deletions .github/workflows/publish-bank2ynab-converter.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,27 +12,24 @@ jobs:
runs-on: ubuntu-latest
permissions:
contents: read
packages: write

steps:
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1

- uses: actions/setup-node@60edb5dd545a775178f52524783378180af0d1f8 # v4.0.2
with:
node-version: '18.x'
registry-url: 'https://npm.pkg.github.com'
node-version: '20.x'
registry-url: 'https://registry.npmjs.org'
cache: npm
always-auth: true
cache-dependency-path: package-lock.json

- run: npm install
env:
NODE_AUTH_TOKEN: ${{ secrets.GITHUB_TOKEN }}

- name: publish bank2-ynab-converter
run: |
cd packages/ynap-bank2ynab-converter
npm run build
npm publish
npm publish --access public
env:
NODE_AUTH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
11 changes: 4 additions & 7 deletions .github/workflows/publish-parsers.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,29 +12,26 @@ jobs:
runs-on: ubuntu-latest
permissions:
contents: read
packages: write

steps:
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1

- uses: actions/setup-node@60edb5dd545a775178f52524783378180af0d1f8 # v4.0.2
with:
node-version: '18.x'
registry-url: 'https://npm.pkg.github.com'
node-version: '20.x'
registry-url: 'https://registry.npmjs.org'
cache: npm
always-auth: true
cache-dependency-path: package-lock.json

- run: npm install
env:
NODE_AUTH_TOKEN: ${{ secrets.GITHUB_TOKEN }}

- name: publish parsers
run: |
cd packages/ynap-bank2ynab-converter
npm run build
cd ../ynap-parsers
npm run build
npm publish
npm publish --access public
env:
NODE_AUTH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
11 changes: 4 additions & 7 deletions packages/ynap-bank2ynab-converter/package.json
Original file line number Diff line number Diff line change
@@ -1,14 +1,11 @@
{
"name": "@envelope-zero/ynap-bank2ynab-converter",
"version": "1.14.83",
"version": "1.14.84",
"license": "MIT",
"author": {
"email": "[email protected]",
"name": "Leo Bernard",
"url": "https://leolabs.org"
},
"publishConfig": {
"registry": "https://npm.pkg.github.com"
"email": "[email protected]",
"name": "Envelope Zero Team",
"url": "https://envelope-zero.org"
},
"bin": "index.js",
"main": "index.js",
Expand Down
11 changes: 6 additions & 5 deletions packages/ynap-parsers/package.json
Original file line number Diff line number Diff line change
@@ -1,14 +1,15 @@
{
"name": "@envelope-zero/ynap-parsers",
"version": "1.17.1",
"version": "1.17.2",
"description": "Parsers from various formats to YNAB CSV",
"main": "index.js",
"author": "Envelope Zero Team <[email protected]> (https://envelope-zero.org)",
"author": {
"email": "[email protected]",
"name": "Envelope Zero Team",
"url": "https://envelope-zero.org"
},
"license": "MIT",
"private": false,
"publishConfig": {
"registry": "https://npm.pkg.github.com"
},
"dependencies": {
"@envelope-zero/ynap-bank2ynab-converter": "1.14.39",
"buffer": "6.0.3",
Expand Down

0 comments on commit 501cd97

Please sign in to comment.