diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml new file mode 100644 index 00000000..fa9fb775 --- /dev/null +++ b/.github/workflows/publish.yml @@ -0,0 +1,34 @@ +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' + + - 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_AUTH_TOKEN }} + run: npm publish diff --git a/package.json b/package.json index 47485b0a..2cc5b279 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "xero-node", - "version": "9.3.0", + "version": "9.3.0-alpha", "description": "Xero NodeJS OAuth 2.0 client for xero-node", "main": "dist/index.js", "types": "dist/index.d.ts",