Skip to content

Commit 1047141

Browse files
authored
Merge pull request #15 from kintel/add-sha512-checksum
Add SHA512 checksum
2 parents ea2922d + f28babd commit 1047141

File tree

1 file changed

+38
-11
lines changed

1 file changed

+38
-11
lines changed

.circleci/config.yml

Lines changed: 38 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,9 @@ jobs:
1313
git submodule update --init
1414
- run:
1515
name: "Extract version"
16-
command: echo "export VERSION=${CIRCLE_TAG#offscreen-}" >> $BASH_ENV
16+
command: |
17+
echo "export VERSION=${CIRCLE_TAG#offscreen-}" >> $BASH_ENV
18+
echo "Extracted version: ${CIRCLE_TAG#offscreen-}"
1719
- run:
1820
name: "Create VERSION file"
1921
command: echo "$VERSION" > VERSION
@@ -23,24 +25,49 @@ jobs:
2325
- run:
2426
name: "Create source tarball"
2527
command: |
26-
echo "Creating tarball for $VERSION"
2728
mkdir -p /tmp/artifacts
2829
git-archive-all --force-submodules --prefix=offscreen-${VERSION}/ /tmp/artifacts/offscreen-${VERSION}.tar.gz
29-
- store_artifacts:
30-
path: /tmp/artifacts
31-
destination: source-tarball
3230
- persist_to_workspace:
3331
root: /tmp/artifacts
3432
paths:
3533
- offscreen-*.tar.gz
3634

35+
calculate-checksum:
36+
docker:
37+
- image: cimg/python:3.10
38+
steps:
39+
- attach_workspace:
40+
at: /tmp/artifacts
41+
- run:
42+
name: "Extract version"
43+
command: |
44+
echo "export VERSION=${CIRCLE_TAG#offscreen-}" >> $BASH_ENV
45+
echo "Extracted version: ${CIRCLE_TAG#offscreen-}"
46+
- run:
47+
name: "Calculate SHA256 checksum"
48+
command: |
49+
sha256sum /tmp/artifacts/offscreen-${VERSION}.tar.gz > /tmp/artifacts/offscreen-${VERSION}.sha256
50+
- run:
51+
name: "Calculate SHA512 checksum"
52+
command: |
53+
sha512sum /tmp/artifacts/offscreen-${VERSION}.tar.gz > /tmp/artifacts/offscreen-${VERSION}.sha512
54+
- store_artifacts:
55+
path: /tmp/artifacts
56+
destination: source-tarball
57+
58+
filters: &filters
59+
tags:
60+
only: /^offscreen-.*/
61+
branches:
62+
ignore: /.*/
63+
3764
workflows:
3865
version: 2
39-
release:
66+
my-release-workflow:
4067
jobs:
4168
- cut-release:
42-
filters:
43-
tags:
44-
only: /^offscreen-.*/
45-
branches:
46-
ignore: /.*/
69+
filters: *filters
70+
- calculate-checksum:
71+
filters: *filters
72+
requires:
73+
- cut-release

0 commit comments

Comments
 (0)