-
Notifications
You must be signed in to change notification settings - Fork 93
58 lines (51 loc) · 1.5 KB
/
release-custom-tag.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
name: 'Release - custom npm tag'
on:
workflow_dispatch:
inputs:
release_type:
description: 'Release Type: major | minor | patch'
required: true
default: 'patch'
npm_tag:
description: 'npm dist tag'
required: true
default: 'sf'
jobs:
test:
uses: './.github/workflows/test.yml'
with:
reportCoverage: false
build-and-release:
needs: ['test']
runs-on: ubuntu-latest
environment:
name: 'npm'
url: 'https://www.npmjs.com/package/@ui5/webcomponents-react'
permissions:
contents: write
id-token: write
steps:
- uses: actions/checkout@v4
with:
token: ${{ secrets.ACCESS_TOKEN }}
fetch-depth: 0
- name: Setup Node.js environment
uses: actions/setup-node@v4.0.0
with:
node-version-file: '.nvmrc'
registry-url: 'https://registry.npmjs.org'
- name: Install and build
run: |
npm install -g npm
yarn install
yarn build
- name: publish
run: |
git config user.email ${{ secrets.BOT_GIT_EMAIL }}
git config user.name ${{ secrets.BOT_GIT_USERNAME }}
${GITHUB_WORKSPACE}/node_modules/.bin/lerna publish ${{ github.event.inputs.release_type }} \
--dist-tag ${{ github.event.inputs.npm_tag }}
env:
GH_TOKEN: ${{ secrets.ACCESS_TOKEN }}
NODE_AUTH_TOKEN: ${{ secrets.NPM_AUTH_TOKEN }}
NPM_CONFIG_PROVENANCE: true