Skip to content

Commit 333b8ea

Browse files
committed
ci: automatically build and sign when pushing a 'v*' tag to main
Signed-off-by: Jared Van Bortel <[email protected]>
1 parent d295f1c commit 333b8ea

File tree

1 file changed

+103
-0
lines changed

1 file changed

+103
-0
lines changed

Diff for: .circleci/continue_config.yml

+103
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,14 @@ jobs:
2525
- image: cimg/base:stable
2626
steps:
2727
- run: "true"
28+
validate-commit-on-main:
29+
docker:
30+
- image: cimg/base:stable
31+
steps:
32+
- checkout
33+
- run:
34+
name: Verify that commit is on the main branch
35+
command: git merge-base --is-ancestor HEAD main
2836
build-offline-chat-installer-macos:
2937
macos:
3038
xcode: 15.4.0
@@ -1782,6 +1790,13 @@ job_only_main: &job_only_main
17821790
branches:
17831791
only: main
17841792

1793+
# allow a job to run on tags as well as commits
1794+
job_allow_tags: &job_allow_tags
1795+
filters:
1796+
tags:
1797+
only:
1798+
- /.*/
1799+
17851800
workflows:
17861801
version: 2
17871802
noop:
@@ -1794,6 +1809,94 @@ workflows:
17941809
- << pipeline.parameters.run-chat-workflow >>
17951810
jobs:
17961811
- noop
1812+
build-chat-installers-release:
1813+
# only run on main branch tags that start with 'v'
1814+
when:
1815+
and:
1816+
- equal: [ << pipeline.git.branch >>, main ]
1817+
- matches: { pattern: '^v.*', value: << pipeline.git.tag >> }
1818+
jobs:
1819+
- validate-commit-on-main
1820+
- build-offline-chat-installer-macos:
1821+
<<: *job_allow_tags
1822+
context: gpt4all
1823+
requires:
1824+
- validate-commit-on-main
1825+
- sign-offline-chat-installer-macos:
1826+
<<: *job_allow_tags
1827+
context: gpt4all
1828+
requires:
1829+
- build-offline-chat-installer-macos
1830+
- notarize-offline-chat-installer-macos:
1831+
<<: *job_allow_tags
1832+
context: gpt4all
1833+
requires:
1834+
- sign-offline-chat-installer-macos
1835+
- build-offline-chat-installer-windows:
1836+
<<: *job_allow_tags
1837+
context: gpt4all
1838+
requires:
1839+
- validate-commit-on-main
1840+
- sign-offline-chat-installer-windows:
1841+
<<: *job_allow_tags
1842+
context: gpt4all
1843+
requires:
1844+
- build-offline-chat-installer-windows
1845+
- build-offline-chat-installer-windows-arm:
1846+
<<: *job_allow_tags
1847+
context: gpt4all
1848+
requires:
1849+
- validate-commit-on-main
1850+
- sign-offline-chat-installer-windows-arm:
1851+
<<: *job_allow_tags
1852+
context: gpt4all
1853+
requires:
1854+
- build-offline-chat-installer-windows-arm
1855+
- build-offline-chat-installer-linux:
1856+
<<: *job_allow_tags
1857+
context: gpt4all
1858+
requires:
1859+
- validate-commit-on-main
1860+
- build-online-chat-installer-macos:
1861+
<<: *job_allow_tags
1862+
context: gpt4all
1863+
requires:
1864+
- validate-commit-on-main
1865+
- sign-online-chat-installer-macos:
1866+
<<: *job_allow_tags
1867+
context: gpt4all
1868+
requires:
1869+
- build-online-chat-installer-macos
1870+
- notarize-online-chat-installer-macos:
1871+
<<: *job_allow_tags
1872+
context: gpt4all
1873+
requires:
1874+
- sign-online-chat-installer-macos
1875+
- build-online-chat-installer-windows:
1876+
<<: *job_allow_tags
1877+
context: gpt4all
1878+
requires:
1879+
- validate-commit-on-main
1880+
- sign-online-chat-installer-windows:
1881+
<<: *job_allow_tags
1882+
context: gpt4all
1883+
requires:
1884+
- build-online-chat-installer-windows
1885+
- build-online-chat-installer-windows-arm:
1886+
<<: *job_allow_tags
1887+
context: gpt4all
1888+
requires:
1889+
- validate-commit-on-main
1890+
- sign-online-chat-installer-windows-arm:
1891+
<<: *job_allow_tags
1892+
context: gpt4all
1893+
requires:
1894+
- build-online-chat-installer-windows-arm
1895+
- build-online-chat-installer-linux:
1896+
<<: *job_allow_tags
1897+
context: gpt4all
1898+
requires:
1899+
- validate-commit-on-main
17971900
build-chat-offline-installers:
17981901
when:
17991902
or:

0 commit comments

Comments
 (0)