Skip to content

Make Version

Make Version #14

Workflow file for this run

name: Make Version
on:
workflow_dispatch: { }
permissions:
contents: read
jobs:
bump-version:
permissions:
id-token: write
contents: write
pull-requests: write
runs-on: ubuntu-latest
outputs:
RELEASE_VERSION: ${{ steps.set-release-version.outputs.RELEASE_VERSION }}
steps:
- name: Checkout code
uses: actions/checkout@9bb56186c3b09b4f86b1c65136769dd318469633 # v4.1.2
with:
ref: ${{ github.ref }}
- name: Setup NodeJS
uses: actions/setup-node@60edb5dd545a775178f52524783378180af0d1f8 # v4.0.2
with:
node-version: "20"
cache: "npm"
- name: Setup dependencies
uses: ./.github/actions/cached-node-modules
- name: Version
id: bump-version
run: npx lerna version --conventional-commits --no-git-tag-version --no-push --no-commit-hooks --yes
- name: Update user agent version
run: |
VERSION=$(cat lerna.json | jq .version -r)
echo -e "// this file is auto generated, do not modify\nexport const PT_VERSION = '$VERSION';" > packages/commons/src/version.ts
- name: Stage changes
run: git add .
- name: Set release version
id: set-release-version
run: |
VERSION=$(cat lerna.json | jq .version -r)
echo RELEASE_VERSION="$VERSION" >> "$GITHUB_OUTPUT"
- name: Create PR
id: create-pr
uses: ./.github/actions/create-pr
with:
temp_branch_prefix: "ci-bump"
pull_request_title: "chore(ci): bump version to ${{ steps.set-release-version.outputs.RELEASE_VERSION }}"
github_token: ${{ secrets.GITHUB_TOKEN }}