-
Notifications
You must be signed in to change notification settings - Fork 2
63 lines (49 loc) · 1.89 KB
/
publish.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
name: Create Release
on: workflow_dispatch
jobs:
create-release:
runs-on: ubuntu-latest
permissions:
contents: write
steps:
- name: Checkout code
uses: actions/checkout@v2
with:
fetch-depth: "0" # fetch all history for all tags and branches so that changeset-builder can generate changelogs
- name: Set up Node.js
uses: actions/setup-node@v2
with:
node-version: 20
registry-url: "https://registry.npmjs.org"
scope: "@differentialhq"
- name: Install dependencies on root
run: npm install
- name: Set DIFFERENTIAL_API_SECRET
run: echo "DIFFERENTIAL_API_SECRET=$(curl https://api.differential.dev/demo/token)" >> $GITHUB_ENV
- uses: sliteteam/github-action-git-crypt-unlock@1.2.0
env:
GIT_CRYPT_KEY: ${{ secrets.GIT_CRYPT_KEY }}
- name: Run tests
run: npx lerna run test
env:
DATABASE_URL: ${{ secrets.DATABASE_URL }}
JWKS_URL: ${{ secrets.JWKS_URL }}
PREDICTOR_API_URL: ${{ secrets.PREDICTOR_API_URL }}
- name: Build packages
run: npx lerna run build
- name: Configure Git User
run: |
git config --global user.name "Differential CI"
git config --global user.email "ci@differential.dev"
- name: Version packages
run: npx lerna version --conventional-commits --yes --no-private --no-push
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
# - name: Version packages
# run: npx lerna version --conventional-commits --yes --no-private --create-release github
# env:
# GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
# - name: Publish packages
# run: npx lerna publish from-package --yes --no-private --registry https://registry.npmjs.org
# env:
# NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}