Skip to content

Commit

Permalink
Merge pull request #725 from XeroAPI/PETOSS-532-Publish-Node-SDK-afte…
Browse files Browse the repository at this point in the history
…r-manual-release-from-GitHub

Petoss 532 publish node sdk after manual release from GitHub
  • Loading branch information
vigneshk-tw authored Sep 30, 2024
2 parents eb7f424 + a041441 commit f6b0bec
Show file tree
Hide file tree
Showing 2 changed files with 38 additions and 2 deletions.
36 changes: 36 additions & 0 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
name: Publish
on:
release:
types: [published]

jobs:
publish:
runs-on: ubuntu-latest
steps:
- name: Checkout xero-node repo
uses: actions/checkout@v4
with:
repository: XeroAPI/xero-node
path: xero-node

- name: Set up Node environment
uses: actions/setup-node@v4
with:
node-version: 20
cache: 'npm'
cache-dependency-path: '**/package-lock.json'
registry-url: 'https://registry.npmjs.org'

- name: Install dependencies
run: npm ci
working-directory: xero-node

- name: Run Build
run: npm run build
working-directory: xero-node

- name: Publish to npm
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
run: npm publish
working-directory: xero-node
4 changes: 2 additions & 2 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit f6b0bec

Please sign in to comment.