Release - Traceloop SDK & Standalone Instrumentations #6
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Release - Traceloop SDK & Standalone Instrumentations | |
on: | |
workflow_dispatch: | |
jobs: | |
release: | |
runs-on: ubuntu-latest | |
permissions: | |
id-token: write | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
persist-credentials: false | |
fetch-depth: 0 | |
ref: ${{ github.ref }} | |
- uses: actions/setup-node@v3 | |
with: | |
cache: "npm" | |
node-version-file: ".nvmrc" | |
- run: npm ci | |
- name: Build | |
run: npx nx run-many --target=build --parallel=3 | |
- name: Create Version | |
run: | | |
git config user.name "${{ github.actor }}" | |
git config user.email "${{ github.actor}}@users.noreply.github.com" | |
npx lerna version --no-private --conventional-commits --yes | |
env: | |
GH_TOKEN: ${{ secrets.GH_ACCESS_TOKEN }} | |
GITHUB_TOKEN: ${{ secrets.GH_ACCESS_TOKEN }} | |
NPM_TOKEN: ${{ secrets.NPM_TOKEN }} | |
- 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: "body.md" | |
tag_name: ${{ env.CURRENT_VERSION }} | |
env: | |
GITHUB_TOKEN: ${{ secrets.GH_ACCESS_TOKEN }} | |
- name: Publish | |
run: npx lerna publish --no-private from-git --yes | |
env: | |
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} |