Skip to content

Commit bb2af3c

Browse files
fix(ci): reduce redundancy in CI (#2037)
1 parent 4d2e85e commit bb2af3c

File tree

13 files changed

+87
-333
lines changed

13 files changed

+87
-333
lines changed

.github/workflows/release_harper_binaries.yml renamed to .github/workflows/binaries.yml

Lines changed: 16 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,16 @@
1-
name: Release Binaries
1+
name: Binaries
22

33
on:
44
push:
5-
tags:
6-
- "v*"
5+
branches: ["master"]
6+
tags: ["v*"]
7+
pull_request:
8+
branches: ["master"]
9+
merge_group:
710

811
jobs:
9-
release:
10-
name: Release ${{ matrix.platform.project }} - ${{ matrix.platform.release_for }}
12+
binaries:
13+
name: ${{ matrix.platform.project }} - ${{ matrix.platform.release_for }}
1114
if: github.event.pull_request.draft == false
1215
strategy:
1316
matrix:
@@ -136,13 +139,16 @@ jobs:
136139
tar czvf ../../../${{ matrix.platform.name }} ${{ matrix.platform.bin }}
137140
fi
138141
cd -
139-
- uses: ncipollo/release-action@v1
140-
with:
141-
artifacts: ${{ matrix.platform.name }}
142-
allowUpdates: true
143-
draft: true
144142
- name: Upload Artifacts
145143
uses: actions/upload-artifact@v4
146144
with:
147145
name: ${{ matrix.platform.bin }}-${{ matrix.platform.target }}
148146
path: ${{ matrix.platform.name }}
147+
148+
- name: Release artifacts
149+
if: startsWith(github.ref, 'refs/tags/v')
150+
uses: ncipollo/release-action@v1
151+
with:
152+
artifacts: ${{ matrix.platform.name }}
153+
allowUpdates: true
154+
draft: true

.github/workflows/build_chrome_plugin.yml

Lines changed: 0 additions & 44 deletions
This file was deleted.

.github/workflows/build_harper_binaries.yml

Lines changed: 0 additions & 143 deletions
This file was deleted.

.github/workflows/build_web.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ on:
88
merge_group:
99

1010
jobs:
11-
build:
11+
build-web:
1212
runs-on: ubuntu-latest
1313
steps:
1414
- uses: actions/checkout@v4

.github/workflows/release_chrome_plugin.yml renamed to .github/workflows/chrome_plugin.yml

Lines changed: 12 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,18 @@
1-
name: Release Chrome Plugin
1+
name: Release Chrome Plugin
22

33
on:
44
push:
5-
tags:
6-
- "v*"
5+
branches: ["master"]
6+
tags: ["v*"]
7+
pull_request:
8+
branches: ["master"]
9+
merge_group:
710

811
env:
912
CARGO_TERM_COLOR: always
1013

1114
jobs:
12-
package:
15+
release-chrome-plugin:
1316
runs-on: ubuntu-latest
1417
steps:
1518
- uses: actions/checkout@v4
@@ -25,9 +28,9 @@ jobs:
2528
- name: Install `wasm-pack`
2629
run: cargo binstall wasm-pack --force --no-confirm
2730
- name: Build Chrome Plugin
28-
run: just build-chrome-plugin
31+
run: just build-chrome-plugin
2932
- name: Build Firefox Plugin
30-
run: just build-firefox-plugin
33+
run: just build-firefox-plugin
3134
- name: Upload Chrome extension
3235
uses: actions/upload-artifact@v4
3336
with:
@@ -38,7 +41,9 @@ jobs:
3841
with:
3942
name: harper-firefox-plugin.zip
4043
path: "packages/chrome-plugin/package/harper-firefox-plugin.zip"
41-
- uses: ncipollo/release-action@v1
44+
- name: Release artifacts
45+
uses: ncipollo/release-action@v1
46+
if: startsWith(github.ref, 'refs/tags/v')
4247
with:
4348
artifacts: "packages/chrome-plugin/package/*.zip"
4449
allowUpdates: true

.github/workflows/precommit.yml renamed to .github/workflows/just-checks.yml

Lines changed: 18 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
name: Precommit
1+
name: Just Checks
22

33
on:
44
push:
@@ -11,8 +11,22 @@ env:
1111
CARGO_TERM_COLOR: always
1212

1313
jobs:
14-
precommit:
14+
just-checks:
1515
runs-on: ubuntu-latest
16+
name: just ${{ matrix.task }}
17+
strategy:
18+
matrix:
19+
task:
20+
[
21+
check-rust,
22+
check-js,
23+
test-harperjs,
24+
test-vscode,
25+
test-chrome-plugin,
26+
test-firefox-plugin,
27+
test-obsidian,
28+
build-obsidian,
29+
]
1630
steps:
1731
- uses: actions/checkout@v4
1832
- uses: extractions/setup-just@v2
@@ -37,7 +51,5 @@ jobs:
3751
run: cargo binstall wasm-pack --force --no-confirm
3852
- name: Install `cargo hack`
3953
run: cargo binstall cargo-hack --force --no-confirm
40-
- name: Run `cargo-hack`
41-
run: cargo hack check --each-feature
42-
- name: Precommit
43-
run: just precommit
54+
- name: Run `${{ matrix.task }}`
55+
run: just ${{ matrix.task }}

.github/workflows/package_vscode_plugin.yml

Lines changed: 0 additions & 67 deletions
This file was deleted.

0 commit comments

Comments
 (0)