forked from plus3it/spel
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.travis.yml
39 lines (36 loc) · 1.25 KB
/
.travis.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
dist: focal
language: python
python: "3.10"
if: branch = master OR type = pull_request
jobs:
include:
- stage: lint
name: Project Syntax Verification
install:
- pip install -r tests/requirements.txt
- make -f Makefile.tardigrade-ci lint/install
script: make -f Makefile.tardigrade-ci lint
- stage: deploy
if: branch = master AND type = push AND repo = plus3it/spel
before_script:
- |
PRIOR_VERSION=$(git describe --abbrev=0 --tags)
RELEASE_VERSION=$(grep current_version $TRAVIS_BUILD_DIR/.bumpversion.cfg | sed 's/^.*= //' )
RELEASE_BODY="* [SPEL v$RELEASE_VERSION CHANGELOG](https://github.com/plus3it/spel/blob/$RELEASE_VERSION/CHANGELOG.md)"
export PRIOR_VERSION RELEASE_VERSION RELEASE_BODY
script: skip
before_deploy:
- |
(set -x; git tag -a $RELEASE_VERSION -m $RELEASE_VERSION)
deploy:
provider: releases
api_key: $GH_RELEASES_TOKEN
name: $RELEASE_VERSION
body: $RELEASE_BODY
tag_name: $RELEASE_VERSION
target_commitish: $TRAVIS_COMMIT
draft: false
on:
branch: master
repo: plus3it/spel
condition: '"$PRIOR_VERSION" != "$RELEASE_VERSION"'