-
Notifications
You must be signed in to change notification settings - Fork 20
46 lines (37 loc) · 1.09 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
name: Build and Publish Workflow
on:
workflow_dispatch:
inputs:
version:
description: 'Semantic version'
required: true
env:
NX_CLOUD_ACCESS_TOKEN: ${{ secrets.NX_CLOUD_ACCESS_TOKEN }}
jobs:
build-and-publish:
runs-on: ubuntu-latest
steps:
- name: Checkout Repository
uses: actions/checkout@v3
- name: Setup Node.js
uses: actions/setup-node@v3
with:
node-version: 18
registry-url: 'https://registry.npmjs.org'
- name: Install Dependencies
run: npm ci
- name: Build Plugin
run: npx nx build nx-sonarqube
- name: E2E
run: npx nx e2e nx-sonarqube-e2e
env:
SONAR_LOGIN: ${{ secrets.SONAR_TOKEN }}
- name: Publish Plugin
run: |
cd dist/packages/nx-sonarqube
npm version ${{ github.event.inputs.version }}
npm publish --access public
git tag ${{ github.event.inputs.version }}
git push origin ${{ github.event.inputs.version }}
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}