Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
33 changes: 33 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
name: SDK Release

on:
workflow_dispatch:

jobs:
release:
name: "cronofy-node"
runs-on: ubuntu-latest
timeout-minutes: 15

steps:
- uses: actions/checkout@v4

- name: Cache node_modules
uses: actions/cache@v4
with:
path: 'node_modules'
key: ${{ runner.os }}-cronofy-node-modules-${{ hashFiles('package-lock.json') }}

- name: Auth NPM
uses: actions/setup-node@v4
with:
node-version: 16.x
registry-url: 'https://registry.npmjs.org'
always-auth: true

- name: Publish
run: make publish
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
NPM_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}

3 changes: 3 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,9 @@ test:
check_dependencies:
@command -v jq >/dev/null || (echo "jq not installed please install via homebrew - 'brew install jq'"; exit 1)

.PHONY: publish
publish: release

.PHONY: release
release: check_dependencies test
npm publish
Expand Down