-
Notifications
You must be signed in to change notification settings - Fork 11
42 lines (38 loc) · 1.44 KB
/
release.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
# This workflow will do a clean installation of node dependencies, cache/restore them, build the source code and run tests across different versions of node
# For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-nodejs
name: Release
on:
workflow_dispatch:
permissions:
contents: write
jobs:
publish-npm:
runs-on: ubuntu-latest
environment: npm
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
node-version: 18
registry-url: https://registry.npmjs.org/
- run: npm i
- run: npm run test:all
- name: get-version # this takes the version of the monorepo root
id: package-version
uses: martinbeentjes/npm-get-version-action@v1.2.3
- name: Create a GitHub release
uses: ncipollo/release-action@v1
with:
tag: 'v${{ steps.package-version.outputs.current-version}}'
name: 'Release v${{ steps.package-version.outputs.current-version}}'
# prerelease: true
# body: changelog...
- run: npm publish --workspace db-service --access public
env:
NODE_AUTH_TOKEN: ${{secrets.npm_token}}
- run: npm publish --workspace sqlite --access public
env:
NODE_AUTH_TOKEN: ${{secrets.npm_token}}
- run: npm publish --workspace postgres --access public
env:
NODE_AUTH_TOKEN: ${{secrets.npm_token}}