From 5b51ba83f588f159e50c6286249d76e3efca2c57 Mon Sep 17 00:00:00 2001 From: Juraj Vajda Date: Wed, 2 Nov 2022 23:29:05 -0400 Subject: [PATCH] Add CI release to ContentDB --- bitbucket-pipelines.yml | 51 +++++++++++++++++++++++++---------------- 1 file changed, 31 insertions(+), 20 deletions(-) diff --git a/bitbucket-pipelines.yml b/bitbucket-pipelines.yml index d683b66..120a4fd 100644 --- a/bitbucket-pipelines.yml +++ b/bitbucket-pipelines.yml @@ -1,23 +1,34 @@ image: atlassian/default-image:3 pipelines: - pull-requests: - "**": - - step: - name: Lint code - script: - - apt-get update - - apt-get -y install lua5.1 - - apt-get -y install luarocks - - luarocks install luacheck - - luacheck . - branches: - master: - - step: - name: Lint code - script: - - apt-get update - - apt-get -y install lua5.1 - - apt-get -y install luarocks - - luarocks install luacheck - - luacheck . \ No newline at end of file + pull-requests: + "**": + - step: + name: Lint code + script: + - apt-get update + - apt-get -y install lua5.1 + - apt-get -y install luarocks + - luarocks install luacheck + - luacheck . + branches: + master: + - step: + name: Lint code + script: + - apt-get update + - apt-get -y install lua5.1 + - apt-get -y install luarocks + - luarocks install luacheck + - luacheck . + tags: + "*": + - step: + name: Deploy to ContentDB + script: + - apt-get update + - apt-get -y install lua5.1 + - apt-get -y install luarocks + - luarocks install luacheck + - luacheck . + - curl --location --request POST 'https://content.minetest.net/api/packages/SaKeL/x_bows/releases/new/' --header 'Authorization:Bearer $CONTENT_DB_X_BOWS_TOKEN' --header 'Content-Type:application/json' --data-raw '{"method":"git", "title":"$BITBUCKET_TAG", "ref":"master"}'