chore(release): 10.176.0 [skip netlify] #3273
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: Check out | |
uses: actions/checkout@v3 | |
with: | |
fetch-depth: 0 | |
token: '${{ secrets.PERSONAL_ACCESS_TOKEN }}' | |
- uses: pnpm/action-setup@v2 | |
with: | |
version: 8 | |
- name: Use Node.js | |
uses: actions/setup-node@v3 | |
with: | |
node-version: 18 | |
cache: 'pnpm' | |
- name: Install dependencies | |
id: install_code | |
run: pnpm 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 | |
if: github.ref == 'refs/heads/main' | |
run: pnpm dlx capacitor-standard-version | |
- name: Create bump and changelog | |
if: github.ref != 'refs/heads/main' | |
run: pnpm dlx capacitor-standard-version --prerelease alpha | |
- name: Push to origin | |
run: | | |
CURRENT_BRANCH=$(git rev-parse --abbrev-ref HEAD) | |
CURRENT_MESSAGE=$(git show-branch --no-name HEAD) | |
remote_repo="https://${GITHUB_ACTOR}:${{ secrets.PERSONAL_ACCESS_TOKEN }}@github.com/${GITHUB_REPOSITORY}.git" | |
git commit --amend -o -m "$CURRENT_MESSAGE [skip netlify]" | |
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: | |
- uses: actions/checkout@v3 | |
- uses: pnpm/action-setup@v2 | |
with: | |
version: 8 | |
- name: Use Node.js | |
uses: actions/setup-node@v3 | |
with: | |
node-version: 18 | |
cache: 'pnpm' | |
- name: Install dependencies | |
id: install_code | |
run: pnpm install --frozen-lockfile | |
- name: CLI capgo install | |
run: pnpm dlx @capgo/cli@latest --version | |
- name: CLI capacitor-standard-version install | |
run: pnpm dlx capacitor-standard-version --version |