Skip to content

Commit a1d4e4f

Browse files
committed
refactor: streamline CI workflows by removing lint and build jobs, update changelog format
1 parent 388a198 commit a1d4e4f

File tree

4 files changed

+19
-875
lines changed

4 files changed

+19
-875
lines changed

.github/workflows/build.yml

Lines changed: 4 additions & 64 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
name: Build source code and check lint
1+
name: Build and publish
22

33
concurrency:
44
group: ${{ github.workflow }}-${{ github.ref }}
@@ -10,70 +10,10 @@ on:
1010
- "*"
1111

1212
jobs:
13-
lint:
14-
runs-on: ubuntu-latest
15-
steps:
16-
- name: Check out
17-
uses: actions/checkout@v5
18-
- uses: oven-sh/setup-bun@v2
19-
- name: Install dependencies
20-
id: install_code
21-
run: bun i
22-
- name: Lint
23-
id: lint_code
24-
run: bun run lint
25-
- name: Build
26-
id: build_code
27-
run: bun run build
28-
- name: Verify
29-
id: verify_code
30-
run: bun run verify:web
31-
build_android:
32-
needs: lint
33-
runs-on: ubuntu-latest
34-
steps:
35-
- name: Check out
36-
uses: actions/checkout@v5
37-
- uses: oven-sh/setup-bun@v2
38-
- name: Install dependencies
39-
id: install_code
40-
run: bun i
41-
- name: Setup java
42-
uses: actions/setup-java@v5
43-
with:
44-
distribution: 'zulu'
45-
java-version: '21'
46-
cache: 'gradle'
47-
cache-dependency-path: | # optional
48-
android/.gradle/*.gradle*
49-
android/**/gradle-wrapper.properties
50-
- name: Build
51-
id: build_code
52-
run: npm run verify:android
53-
build_ios:
54-
needs: lint
55-
runs-on: macOS-latest
56-
steps:
57-
- name: Check out
58-
uses: actions/checkout@v5
59-
- uses: oven-sh/setup-bun@v2
60-
- uses: actions/cache@v4
61-
id: cocoapods-cache
62-
with:
63-
path: ios/Pods
64-
key: ${{ runner.os }}-pods-${{ hashFiles('ios/Podfile.lock') }}
65-
restore-keys: |
66-
${{ runner.os }}-pods-
67-
- name: Install dependencies
68-
id: install_code
69-
run: bun i
70-
- name: Build
71-
id: build_code
72-
run: bun run verify:ios
13+
# Tests already passed before tag was created, so just build and deploy
7314
deploy:
74-
needs: [build_android, build_ios]
7515
runs-on: ubuntu-latest
76-
name: "Build code and npm release"
16+
name: "Build and publish to npm"
7717
permissions:
7818
contents: write
7919
id-token: write
@@ -92,7 +32,7 @@ jobs:
9232
run: bun run build
9333
- name: Generate AI changelog
9434
id: changelog
95-
uses: mistricky/ccc@v0.2.5
35+
uses: mistricky/ccc@v0.2.3
9636
with:
9737
anthropic_api_key: ${{ secrets.ANTHROPIC_API_KEY }}
9838
github_token: ${{ secrets.GITHUB_TOKEN }}

.github/workflows/bump_version.yml

Lines changed: 12 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -10,10 +10,17 @@ on:
1010
- '.github/**'
1111

1212
jobs:
13+
# Run all tests first before creating any tags
14+
test:
15+
if: ${{ !startsWith(github.event.head_commit.message, 'chore(release):') }}
16+
uses: ./.github/workflows/test.yml
17+
18+
# Only bump version and create tag if all tests pass
1319
bump-version:
20+
needs: [test]
1421
if: ${{ !startsWith(github.event.head_commit.message, 'chore(release):') }}
1522
runs-on: ubuntu-latest
16-
name: "Bump version and create changelog with standard version"
23+
name: "Bump version and create tag"
1724
steps:
1825
- name: Check out
1926
uses: actions/checkout@v5
@@ -34,27 +41,15 @@ jobs:
3441
run: |
3542
git add README.md
3643
git commit --m "docs: update doc" || true
37-
- name: Create bump and changelog main
44+
- name: Create version bump main
3845
if: github.ref == 'refs/heads/main'
39-
run: bunx capacitor-plugin-standard-version@latest
40-
- name: Create bump and changelog development
46+
run: bunx capacitor-plugin-standard-version@latest --skip.changelog
47+
- name: Create version bump development
4148
if: github.ref != 'refs/heads/main'
42-
run: bunx capacitor-plugin-standard-version@latest --prerelease alpha
49+
run: bunx capacitor-plugin-standard-version@latest --prerelease alpha --skip.changelog
4350
- name: Push to origin
4451
run: |
4552
CURRENT_BRANCH=$(git rev-parse --abbrev-ref HEAD)
4653
remote_repo="https://${GITHUB_ACTOR}:${{ secrets.PERSONAL_ACCESS_TOKEN }}@github.com/${GITHUB_REPOSITORY}.git"
4754
git pull $remote_repo $CURRENT_BRANCH
4855
git push $remote_repo HEAD:$CURRENT_BRANCH --follow-tags --tags
49-
create-cache:
50-
if: ${{ !startsWith(github.event.head_commit.message, 'chore(release):') }}
51-
runs-on: ubuntu-latest
52-
name: "Create global cache on main branch"
53-
steps:
54-
- uses: actions/checkout@v5
55-
- uses: oven-sh/setup-bun@v2
56-
- name: Install dependencies
57-
id: install_code
58-
run: bun i
59-
- name: CLI capacitor-standard-version install
60-
run: bunx capacitor-standard-version@latest --version

.github/workflows/test.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ on:
66
- renovate/**
77
pull_request:
88
branches: [ main ]
9+
workflow_call: # Allow this workflow to be called by other workflows
910

1011
jobs:
1112
build_android:

0 commit comments

Comments
 (0)