Skip to content

[2.2.0] - 2024-05-06 #50

[2.2.0] - 2024-05-06

[2.2.0] - 2024-05-06 #50

Workflow file for this run

name: Publish
on:
release:
types: [created]
jobs:
build:
runs-on: ubuntu-latest
env:
TARGET_URL: https://www.npmjs.com/package/@patch-technology/patch
steps:
- uses: actions/checkout@v2
- uses: chrnorm/deployment-action@releases/v1
name: Create GitHub deployment
id: deployment
with:
token: '${{ github.token }}'
target_url: ${{ env.TARGET_URL }}
environment: production
- uses: actions/setup-node@v3
with:
node-version: 14
registry-url: https://registry.npmjs.org/
- name: Install dependencies
run: npm install
- name: Build package
run: npm run build
- name: Run tests
env:
SANDBOX_API_KEY: ${{ secrets.SANDBOX_API_KEY }}
run: npm test
- name: Publish package
run: npm publish --access public
env:
NODE_AUTH_TOKEN: ${{secrets.NPM_TOKEN}}
- name: Update deployment status (success)
if: success()
uses: chrnorm/deployment-status@releases/v1
with:
token: '${{ github.token }}'
target_url: ${{ env.TARGET_URL }}
state: 'success'
deployment_id: ${{ steps.deployment.outputs.deployment_id }}
- name: Update deployment status (failure)
if: failure()
uses: chrnorm/deployment-status@releases/v1
with:
token: '${{ github.token }}'
target_url: ${{ env.TARGET_URL }}
state: 'failure'
deployment_id: ${{ steps.deployment.outputs.deployment_id }}