diff --git a/.circleci/config.yml b/.circleci/config.yml index 52b55e0..d825d6f 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -13,7 +13,9 @@ jobs: git submodule update --init - run: name: "Extract version" - command: echo "export VERSION=${CIRCLE_TAG#offscreen-}" >> $BASH_ENV + command: | + echo "export VERSION=${CIRCLE_TAG#offscreen-}" >> $BASH_ENV + echo "Extracted version: ${CIRCLE_TAG#offscreen-}" - run: name: "Create VERSION file" command: echo "$VERSION" > VERSION @@ -23,24 +25,49 @@ jobs: - run: name: "Create source tarball" command: | - echo "Creating tarball for $VERSION" mkdir -p /tmp/artifacts git-archive-all --force-submodules --prefix=offscreen-${VERSION}/ /tmp/artifacts/offscreen-${VERSION}.tar.gz - - store_artifacts: - path: /tmp/artifacts - destination: source-tarball - persist_to_workspace: root: /tmp/artifacts paths: - offscreen-*.tar.gz + calculate-checksum: + docker: + - image: cimg/python:3.10 + steps: + - attach_workspace: + at: /tmp/artifacts + - run: + name: "Extract version" + command: | + echo "export VERSION=${CIRCLE_TAG#offscreen-}" >> $BASH_ENV + echo "Extracted version: ${CIRCLE_TAG#offscreen-}" + - run: + name: "Calculate SHA256 checksum" + command: | + sha256sum /tmp/artifacts/offscreen-${VERSION}.tar.gz > /tmp/artifacts/offscreen-${VERSION}.sha256 + - run: + name: "Calculate SHA512 checksum" + command: | + sha512sum /tmp/artifacts/offscreen-${VERSION}.tar.gz > /tmp/artifacts/offscreen-${VERSION}.sha512 + - store_artifacts: + path: /tmp/artifacts + destination: source-tarball + +filters: &filters + tags: + only: /^offscreen-.*/ + branches: + ignore: /.*/ + workflows: version: 2 - release: + my-release-workflow: jobs: - cut-release: - filters: - tags: - only: /^offscreen-.*/ - branches: - ignore: /.*/ + filters: *filters + - calculate-checksum: + filters: *filters + requires: + - cut-release