Skip to content

Commit f56e446

Browse files
committed
refactor(ci): run/test crates publish with all crates at once
Instead of doing it one by one using a matrix.
1 parent 93744f5 commit f56e446

4 files changed

Lines changed: 6 additions & 76 deletions

File tree

.github/workflows/ci.yml

Lines changed: 1 addition & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -552,21 +552,6 @@ jobs:
552552
provenance: false
553553

554554
publish-crate-test:
555-
strategy:
556-
fail-fast: false
557-
max-parallel: 1
558-
matrix:
559-
package:
560-
[
561-
mithril-stm,
562-
mithril-build-script,
563-
mithril-common,
564-
mithril-aggregator-client,
565-
mithril-aggregator-discovery,
566-
mithril-cardano-node-internal-database,
567-
mithril-client,
568-
]
569-
570555
runs-on: ubuntu-24.04
571556
needs:
572557
- build
@@ -587,7 +572,7 @@ jobs:
587572
uses: ./.github/workflows/actions/publish-rust-crates
588573
with:
589574
dry_run: "true"
590-
packages: ${{ matrix.package }}
575+
packages: mithril-stm, mithril-build-script, mithril-common, mithril-aggregator-client, mithril-aggregator-discovery, mithril-cardano-node-internal-database, mithril-client
591576

592577
publish-wasm-test:
593578
strategy:

.github/workflows/manual-publish-crates.yml

Lines changed: 2 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -28,26 +28,6 @@ on:
2828

2929
jobs:
3030
publish-crate:
31-
strategy:
32-
fail-fast: true
33-
max-parallel: 1
34-
matrix:
35-
include:
36-
- package: mithril-stm
37-
api_token_secret_name: CRATES_IO_API_TOKEN
38-
- package: mithril-build-script
39-
api_token_secret_name: CRATES_IO_API_TOKEN_MITHRIL_BUILD_SCRIPT
40-
- package: mithril-common
41-
api_token_secret_name: CRATES_IO_API_TOKEN_MITHRIL_COMMON
42-
- package: mithril-aggregator-client,
43-
api_token_secret_name: CRATES_IO_API_TOKEN_MITHRIL_AGGREGATOR_CLIENT
44-
- package: mithril-aggregator-discovery,
45-
api_token_secret_name: CRATES_IO_API_TOKEN_MITHRIL_AGGREGATOR_DISCOVERY
46-
- package: mithril-cardano-node-internal-database
47-
api_token_secret_name: CRATES_IO_API_TOKEN_MITHRIL_CARDANO_NODE_INTERNAL_DATABASE
48-
- package: mithril-client
49-
api_token_secret_name: CRATES_IO_API_TOKEN_MITHRIL_CLIENT
50-
5131
runs-on: ubuntu-24.04
5232
steps:
5333
- name: Checkout sources
@@ -67,5 +47,5 @@ jobs:
6747
uses: ./.github/workflows/actions/publish-rust-crates
6848
with:
6949
dry_run: ${{ inputs.dry_run }}
70-
packages: ${{ matrix.package }}
71-
api_token: ${{ secrets[matrix.api_token_secret_name] }}
50+
packages: mithril-stm, mithril-build-script, mithril-common, mithril-aggregator-client, mithril-aggregator-discovery, mithril-cardano-node-internal-database, mithril-client
51+
api_token: ${{ secrets.CRATES_IO_API_TOKEN }}

.github/workflows/pre-release.yml

Lines changed: 1 addition & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -324,21 +324,6 @@ jobs:
324324

325325
publish-crate-test:
326326
if: github.event_name == 'push'
327-
strategy:
328-
fail-fast: false
329-
max-parallel: 1
330-
matrix:
331-
package:
332-
[
333-
mithril-stm,
334-
mithril-build-script,
335-
mithril-common,
336-
mithril-aggregator-client,
337-
mithril-aggregator-discovery,
338-
mithril-cardano-node-internal-database,
339-
mithril-client,
340-
]
341-
342327
runs-on: ubuntu-24.04
343328
steps:
344329
- name: Checkout sources
@@ -353,7 +338,7 @@ jobs:
353338
uses: ./.github/workflows/actions/publish-rust-crates
354339
with:
355340
dry_run: "true"
356-
packages: ${{ matrix.package }}
341+
packages: mithril-stm, mithril-build-script, mithril-common, mithril-aggregator-client, mithril-aggregator-discovery, mithril-cardano-node-internal-database, mithril-client
357342

358343
publish-next-wasm-package:
359344
if: github.event_name == 'push'

.github/workflows/release.yml

Lines changed: 2 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -234,26 +234,6 @@ jobs:
234234

235235
publish-crate:
236236
if: github.event_name == 'release'
237-
strategy:
238-
fail-fast: true
239-
max-parallel: 1
240-
matrix:
241-
include:
242-
- package: mithril-stm
243-
api_token_secret_name: CRATES_IO_API_TOKEN
244-
- package: mithril-build-script
245-
api_token_secret_name: CRATES_IO_API_TOKEN_MITHRIL_BUILD_SCRIPT
246-
- package: mithril-common
247-
api_token_secret_name: CRATES_IO_API_TOKEN_MITHRIL_COMMON
248-
- package: mithril-aggregator-client,
249-
api_token_secret_name: CRATES_IO_API_TOKEN_MITHRIL_AGGREGATOR_CLIENT
250-
- package: mithril-aggregator-discovery,
251-
api_token_secret_name: CRATES_IO_API_TOKEN_MITHRIL_AGGREGATOR_DISCOVERY
252-
- package: mithril-cardano-node-internal-database
253-
api_token_secret_name: CRATES_IO_API_TOKEN_MITHRIL_CARDANO_NODE_INTERNAL_DATABASE
254-
- package: mithril-client
255-
api_token_secret_name: CRATES_IO_API_TOKEN_MITHRIL_CLIENT
256-
257237
runs-on: ubuntu-24.04
258238
steps:
259239
- name: Checkout sources
@@ -268,8 +248,8 @@ jobs:
268248
uses: ./.github/workflows/actions/publish-rust-crates
269249
with:
270250
dry_run: "false"
271-
packages: ${{ matrix.package }}
272-
api_token: ${{ secrets[matrix.api_token_secret_name] }}
251+
packages: mithril-stm, mithril-build-script, mithril-common, mithril-aggregator-client, mithril-aggregator-discovery, mithril-cardano-node-internal-database, mithril-client
252+
api_token: ${{ secrets.CRATES_IO_API_TOKEN }}
273253

274254
promote-wasm-package-to-latest:
275255
if: github.event_name == 'release'

0 commit comments

Comments
 (0)