Skip to content

Commit

Permalink
ci: added release-manual.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
Egor Didenko committed Apr 10, 2024
1 parent 8473e03 commit aea992c
Show file tree
Hide file tree
Showing 2 changed files with 52 additions and 10 deletions.
45 changes: 45 additions & 0 deletions .github/workflows/release-manual.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
name: "Release and Publish Manual"

on:
workflow_dispatch:
push:
branches:
- main

jobs:
build:
name: "Build"
runs-on: ubuntu-latest
steps:
- name: "Checkout"
uses: actions/checkout@v4
with:
fetch-depth: 0

- name: "Use Node.js 16"
uses: actions/setup-node@v4
with:
node-version: '16'

- name: "Install dependencies"
working-directory: ./
run: npm ci

- name: "Run build"
run: lerna run build

- name: "Version and publish" # Interesting step
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
git config --global user.email "github-actions[bot]@users.noreply.github.com"
git config --global user.name "github-actions[bot]"
if [ ${{ github.base_ref }} = development ]; then
npx lerna version --conventional-commits --conventional-prerelease --preid beta --yes
else
npx lerna version --conventional-commits --conventional-graduate --yes
fi
npx lerna publish from-git --yes
17 changes: 7 additions & 10 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -34,13 +34,10 @@ jobs:
git config --global user.email "github-actions[bot]@users.noreply.github.com"
git config --global user.name "github-actions[bot]"
npx lerna publish from-git --yes
# git config user.name "${{ github.actor }}"
# git config user.email "${{ github.actor}}@users.noreply.github.com"
#
# if [ ${{ github.base_ref }} = development ]; then
# npx lerna version --conventional-commits --conventional-prerelease --preid beta --yes
# else
# npx lerna version --conventional-commits --conventional-graduate --yes
# fi
if [ ${{ github.base_ref }} = development ]; then
npx lerna version --conventional-commits --conventional-prerelease --preid beta --yes
else
npx lerna version --conventional-commits --conventional-graduate --yes
fi
npx lerna publish from-git --yes

0 comments on commit aea992c

Please sign in to comment.