Merge branch 'main' of https://github.com/Cap-go/CLI #1414
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: Bump version | |
on: | |
push: | |
branches: | |
- main | |
- development | |
jobs: | |
bump-version: | |
if: ${{ !startsWith(github.event.head_commit.message, 'chore(release):') }} | |
runs-on: ubuntu-latest | |
name: "Bump version and create changelog with standard version" | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
with: | |
fetch-depth: 0 | |
token: "${{ secrets.PERSONAL_ACCESS_TOKEN }}" | |
- name: Setup bun | |
uses: oven-sh/setup-bun@v2 | |
with: | |
bun-version: latest | |
- name: Install dependencies | |
id: install_code | |
run: bun install --frozen-lockfile | |
- name: Git config | |
run: | | |
git config --local user.name "github-actions[bot]" | |
git config --local user.email "github-actions[bot]@users.noreply.github.com" | |
- name: Create bump and changelog main | |
if: github.ref == 'refs/heads/main' | |
run: npx standard-version | |
- name: Create bump and changelog development | |
if: github.ref != 'refs/heads/main' | |
run: npx standard-version --prerelease alpha | |
- name: Push to origin | |
run: | | |
CURRENT_BRANCH=$(git rev-parse --abbrev-ref HEAD) | |
remote_repo="https://${GITHUB_ACTOR}:${{ secrets.PERSONAL_ACCESS_TOKEN }}@github.com/${GITHUB_REPOSITORY}.git" | |
git pull $remote_repo $CURRENT_BRANCH | |
git push $remote_repo HEAD:$CURRENT_BRANCH --follow-tags --tags | |
create-cache: | |
if: ${{ !startsWith(github.event.head_commit.message, 'chore(release):') }} | |
runs-on: ubuntu-latest | |
name: "Create global cache on main branch" | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
- name: Setup bun | |
uses: oven-sh/setup-bun@v2 | |
with: | |
bun-version: latest | |
- name: Install dependencies | |
id: install_code | |
run: bun install --frozen-lockfile |