forked from plus3it/spel
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.travis.yml
46 lines (43 loc) · 1.66 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
40
41
42
43
44
45
46
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:
# Per https://travis-ci.community/t/deployments-are-failing-due-to-uri-dependency/14375
- yes | gem update --system --force
- gem install bundler
# Travis-CI is so broken, https://travis-ci.community/t/cannot-load-such-file-faraday-net-http-loaderror/14455
- gem install faraday-net_http -v '3.3.0' # Fix faraday version
- gem install uri
- gem install logger
- |
(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"'