-
Notifications
You must be signed in to change notification settings - Fork 69
60 lines (56 loc) · 2.02 KB
/
Copy pathrelease.yml
File metadata and controls
60 lines (56 loc) · 2.02 KB
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
name: Release - Traceloop SDK & Standalone Instrumentations
on:
workflow_dispatch:
jobs:
release:
runs-on: ubuntu-latest
permissions:
id-token: write
steps:
- name: Generate GitHub App Token
id: app-token
uses: actions/create-github-app-token@v2
with:
app-id: ${{ secrets.OSS_CI_BOT_APP_ID }}
private-key: ${{ secrets.OSS_CI_BOT_PRIVATE_KEY }}
repositories: ${{ github.event.repository.name }}
- uses: actions/checkout@v4
with:
persist-credentials: false
fetch-depth: 0
ref: ${{ github.ref }}
token: ${{ steps.app-token.outputs.token }}
- uses: pnpm/action-setup@v2
with:
version: 10
- uses: actions/setup-node@v4
with:
cache: "pnpm"
node-version-file: ".nvmrc"
- run: pnpm install --frozen-lockfile
- name: Build
run: pnpm nx run-many --target=build --parallel=3
- name: Git Identity
run: |
git config --global user.name 'github-actions[bot]'
git config --global user.email 'github-actions[bot]@users.noreply.github.com'
git remote set-url origin https://x-access-token:${GITHUB_TOKEN}@github.com/$GITHUB_REPOSITORY
env:
GITHUB_TOKEN: ${{ steps.app-token.outputs.token }}
- name: Create Version
run: pnpm lerna version --no-private --conventional-commits --yes
- name: Set Current Version
run: |
CURRENT_VERSION=$(node -p 'require("./lerna.json").version')
echo "CURRENT_VERSION=${CURRENT_VERSION}" >> $GITHUB_ENV
- name: Create Release
uses: softprops/action-gh-release@v1
with:
body_path: "CHANGELOG.md"
tag_name: ${{ env.CURRENT_VERSION }}
env:
GITHUB_TOKEN: ${{ steps.app-token.outputs.token }}
- name: Build for Release
run: pnpm nx run-many --target=build --parallel=3
- name: Publish
run: pnpm lerna publish --no-private from-package --yes