Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add release publish workflow #2

Merged
merged 2 commits into from
Nov 25, 2024
Merged
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
35 changes: 32 additions & 3 deletions .github/workflows/pr-validation.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,17 +4,19 @@ on:
push:
branches:
- main
tags:
- v*
pull_request:
branches:
- main

env:
NODE_VER: 16.14.0

jobs:
build:
runs-on: ubuntu-latest

env:
NODE_VER: 16.14.0

services:
# docker run --name durabletask-sidecar -p 4001:4001 --env 'DURABLETASK_SIDECAR_LOGLEVEL=Debug' --rm cgillum/durabletask-sidecar:latest start --backend Emulator
durabletask-sidecar:
Expand Down Expand Up @@ -43,3 +45,30 @@ jobs:

- name: ✅ Run e2e tests
run: ./scripts/test-e2e.sh

publish:
needs: build
if: startswith(github.ref, 'refs/tags/v')
runs-on: ubuntu-latest
# TODO environment?
# environment: production
steps:
- name: 📥 Checkout code
uses: actions/checkout@v2

- name: ⚙️ NodeJS - Install
uses: actions/setup-node@v2
with:
node-version: ${{ env.NODE_VER }}
registry-url: "https://registry.npmjs.org"

- name: Install dependencies
run: npm install

- name: Build package
run: npm run build-ci

- name: Publish to npm (@dapr/durabletask-js)
run: npm publish build/ --access public
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
11 changes: 6 additions & 5 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"name": "@microsoft/durabletask-js",
"name": "@dapr/durabletask-js",
"version": "0.1.0-alpha.2",
"description": "A Durable Task Javascript SDK compatible with Dapr Workflow and its underlying Durable Task engine",
"types": "./build/index.d.ts",
Expand All @@ -17,19 +17,20 @@
"pretty": "prettier --list-different \"**/*.{ts,tsx,js,jsx,json,md}\"",
"pretty-fix": "prettier --write \"**/*.{ts,tsx,js,jsx,json,md}\"",
"prebuild": "./scripts/prebuild.sh",
"build": "npm install && npm run lint && npm run pretty && ./scripts/build.sh"
"build": "npm install && npm run lint && npm run pretty && ./scripts/build.sh",
"build-ci": "npm run prebuild && ./scripts/build.sh"
},
"repository": {
"type": "git",
"url": "git+https://github.com/microsoft/durabletask-js.git"
"url": "git+https://github.com/dapr/durabletask-js.git"
},
"keywords": [],
"author": "",
"license": "MIT",
"bugs": {
"url": "https://github.com/microsoft/durabletask-js/issues"
"url": "https://github.com/dapr/durabletask-js/issues"
},
"homepage": "https://github.com/microsoft/durabletask-js#readme",
"homepage": "https://github.com/dapr/durabletask-js#readme",
"devDependencies": {
"@swc/core": "^1.3.55",
"@swc/helpers": "^0.5.1",
Expand Down
Loading