tbytes 0.1.0

A tiny library for reading and writing typed data into buffers
Documentation
include:
  - local: "/.gitlab-ci/utils.gitlab-ci.yml"
  - local: "/.gitlab-ci/executors.gitlab-ci.yml"

# ---------------------------------------------------------
#            [RELEASE] Publish to Crates.io
# ---------------------------------------------------------
.release:publish:crates:
  stage: release
  extends: .executor:rust
  script:
    - 'echo "Run cargo publish in dry run: ${DRY_CARGO_RELEASE:-false}"'
    - '[ "${DRY_CARGO_RELEASE}" = "true" ] && export DRY_RUN="--dry-run"'
    - cargo publish --package ${CI_CARGO_PACKAGE} ${DRY_RUN}
  only:
    - tags
  except:
    - schedules

# ---------------------------------------------------------
#          [RELEASE] Create a GitLab release
# ---------------------------------------------------------
.release:release:
  stage: release
  image: registry.gitlab.com/gitlab-org/release-cli:latest
  variables:
    RELEASE_TAG: ${CI_COMMIT_REF_NAME}
    RELEASE_REF: ${CI_COMMIT_REF_NAME}
    RELEASE_NAME: "Release ${RELEASE_TAG}"
    RELEASE_DESCRIPTION: "Release ${RELEASE_TAG}."
  script:
    - echo "Creating a release '${RELEASE_TAG}'."
  release:
    name: '$RELEASE_NAME'
    ref: '$RELEASE_REF'
    tag_name: '$RELEASE_TAG'
    description: '$RELEASE_DESCRIPTION'
  only:
    - tags
  except:
    - schedules