diff --git a/.woodpecker.yml b/.woodpecker.yml index d89eebc..2595655 100644 --- a/.woodpecker.yml +++ b/.woodpecker.yml @@ -1,3 +1,8 @@ +clone: + git: + image: woodpeckerci/plugin-git + tags: true + pipeline: test: image: debian @@ -10,10 +15,14 @@ pipeline: - echo /opt/instantclient_* > /etc/ld.so.conf.d/oracle-instantclient.conf - ldconfig - ./tests.sh --quiet + when: + event: push build: image: debian when: + event: tag tag: v* + branch: master commands: - DEBIAN_FRONTEND=noninteractive apt-get -qq update < /dev/null > /dev/null - DEBIAN_FRONTEND=noninteractive apt-get -y -qq upgrade < /dev/null > /dev/null @@ -23,7 +32,9 @@ pipeline: publish: image: plugins/gitea-release when: + event: tag tag: v* + branch: master settings: api_key: from_secret: gitea_token diff --git a/build.sh b/build.sh index 6404c78..2c8ead5 100755 --- a/build.sh +++ b/build.sh @@ -9,9 +9,6 @@ cd $( dirname $0 ) echo "Clean previous build..." rm -fr dist deb_dist -echo "Fetch git tags..." -git fetch --tags - echo "Detect version using git describe..." VERSION="$( git describe --tags|sed 's/^[^0-9]*//' )"