Skip to content

Commit b2f6c1a

Browse files
authored
feat: publish snapshot on merge to main (#25644)
1 parent 9f541b7 commit b2f6c1a

File tree

1 file changed

+42
-9
lines changed

1 file changed

+42
-9
lines changed

.circleci/config.yml

Lines changed: 42 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -53,20 +53,20 @@ any_filter: &any_filter
5353
release_filter: &release_filter
5454
filters:
5555
tags:
56-
# This regex matches what is found in 'scripts/get-version' with the
57-
# '[[:digit:]]' transformed into '\d'. This also excludes release
58-
# candidate detection, because this filter only matches against
59-
# full releases.
6056
only: /^v(\d+)(?:\.(\d+))?(?:\.(\d+))?$/
6157
branches:
6258
ignore: /.*/
6359

60+
main_filter: &main_filter
61+
filters:
62+
branches:
63+
only: main
64+
6465
nofork_filter: &nofork_filter
6566
filters:
6667
branches:
6768
ignore: /pull\/[0-9]+/
6869

69-
7070
commands:
7171
rust_components:
7272
description: Verify installed components
@@ -278,21 +278,24 @@ jobs:
278278
parameters:
279279
target:
280280
type: string
281+
profile:
282+
type: string
283+
default: release
281284
steps:
282285
- checkout
283286
- run:
284287
name: Install Target
285288
command: rustup target add << parameters.target >>
286289
- run:
287290
name: Cargo release build
288-
command: target-env cargo build --target=<< parameters.target >> --workspace --release
291+
command: target-env cargo build --target=<< parameters.target >> --profile=<< parameters.profile >> --workspace
289292
# linking might take a while and doesn't produce CLI output
290293
no_output_timeout: 30m
291294
- run:
292295
name: tar and gzip build artifacts
293296
command: |
294297
mkdir -p artifacts
295-
tar --ignore-failed-read -czvf "${PWD}/artifacts/influxdb3-edge_<< parameters.target >>.tar.gz" -C "${PWD}/target/<< parameters.target >>/release" influxdb3{,.exe}
298+
tar --ignore-failed-read -czvf "${PWD}/artifacts/influxdb3-edge_<< parameters.target >>.tar.gz" -C "${PWD}/target/<< parameters.target >>/<< parameters.profile >>" influxdb3{,.exe}
296299
- store_artifacts:
297300
path: artifacts
298301
- persist_to_workspace:
@@ -473,9 +476,40 @@ jobs:
473476
- run: |
474477
echo build executed successfully
475478
476-
477479
workflows:
478480
version: 2
481+
snapshot:
482+
jobs:
483+
- build-release:
484+
<<: *main_filter
485+
name: build-snapshot-<< matrix.target >>
486+
matrix:
487+
parameters:
488+
profile:
489+
- quick-release
490+
target:
491+
- aarch64-apple-darwin
492+
- aarch64-unknown-linux-gnu
493+
- aarch64-unknown-linux-musl
494+
- x86_64-pc-windows-gnu
495+
- x86_64-unknown-linux-gnu
496+
- x86_64-unknown-linux-musl
497+
- build-packages:
498+
<<: *main_filter
499+
requires:
500+
- build-release
501+
- sign-packages:
502+
<<: *main_filter
503+
requires:
504+
- build-packages
505+
- publish-packages:
506+
<<: *main_filter
507+
matrix:
508+
parameters:
509+
destination: [ snapshots ]
510+
requires:
511+
- build-release
512+
- sign-packages
479513
ci:
480514
jobs:
481515
- fmt:
@@ -539,7 +573,6 @@ workflows:
539573
arch: [ x86_64, aarch64 ]
540574
requires:
541575
- build-packages
542-
543576
- sign-packages:
544577
<<: *release_filter
545578
requires:

0 commit comments

Comments
 (0)