-
Notifications
You must be signed in to change notification settings - Fork 0
56 lines (49 loc) · 1.35 KB
/
release.yaml
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
name: Release
on:
workflow_dispatch:
inputs:
PACKAGE:
description: 'The package you wish to release'
type: choice
options:
- opentelemetry-baggage-span-processor
- opentelemetry-mutable-baggage
required: true
VERSION_BUMP:
description: 'The version bump'
type: choice
options:
- major
- minor
- patch
default: minor
required: true
jobs:
release:
runs-on: ubuntu-latest
concurrency: 1
environment: release
env:
NPM_WORKSPACE: packages/${{ github.event.inputs.PACKAGE }}
steps:
- name: Checkout code
uses: actions/checkout@v4
with:
token: ${{ secrets.RELEASE_GITHUB_TOKEN }}
- name: Setup Node.js version
uses: actions/setup-node@v3
with:
node-version: 20
- name: Install node packages
run: npm ci
- name: Configure git
run: |
git config user.name "Uphold"
git config user.email "[email protected]"
- name: Generate release
env:
NPM_TOKEN: ${{ secrets.RELEASE_NPM_TOKEN }}
GITHUB_TOKEN: ${{ secrets.RELEASE_GITHUB_TOKEN }}
run: |
echo "//registry.npmjs.org/:_authToken=\${NPM_TOKEN}" > .npmrc
npm run release --workspace $NPM_WORKSPACE -- --increment ${{ github.event.inputs.VERSION_BUMP }} -V