Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
49 changes: 38 additions & 11 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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