-
Notifications
You must be signed in to change notification settings - Fork 22
73 lines (59 loc) · 2.02 KB
/
Copy pathbump-version.yml
File metadata and controls
73 lines (59 loc) · 2.02 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
name: Auto Bump Version
on:
push:
branches:
- main # Trigger on push to main branch
permissions:
actions: write
jobs:
bump:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v7
with:
token: ${{ secrets.FLORA_GITHUB_TOKEN }}
- name: Set up Node.js
uses: actions/setup-node@v7
with:
node-version: lts/*
package-manager-cache: false
- run: corepack enable
- name: Cache yarn dependencies
uses: actions/cache@v6
with:
path: |
**/node_modules
~/.cache/yarn
key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }}
restore-keys: |
${{ runner.os }}-yarn-
- name: Install dependencies
run: yarn install --mode skip-build
env:
YARN_ENABLE_IMMUTABLE_INSTALLS: false
- name: Set up Git
run: |
git config --global user.name 'github-actions'
git config --global user.email 'github-actions@github.com'
- name: Bump version in root package.json
run: yarn version patch
- name: Bump version in packages/suite
working-directory: packages/suite
run: yarn version patch
- name: Commit version bumps
id: commit_version_bumps
run: |
git add package.json yarn.lock packages/suite/package.json
git commit -m "chore: bump versions in root and suite package.json [skip actions]"
echo "commit_sha=$(git rev-parse HEAD)" >> $GITHUB_ENV
- name: Push changes
run: |
git push origin main
- name: Trigger pre-build workflow
run: |
curl -X POST -H "Accept: application/vnd.github+json" \
-H "Authorization: Bearer ${{ secrets.GITHUB_TOKEN }}" \
-H "X-GitHub-Api-Version: 2022-11-28" \
-d '{"ref":"main"}' \
https://api.github.com/repos/${{ github.repository }}/actions/workflows/pre-build.yml/dispatches