This commit is contained in:
parent
fc8f5457fb
commit
97750df72f
17
.drone.yml
17
.drone.yml
@ -6,8 +6,19 @@ steps:
|
|||||||
- name: generate
|
- name: generate
|
||||||
image: golang:1.19-alpine
|
image: golang:1.19-alpine
|
||||||
commands:
|
commands:
|
||||||
- apk add --no-cache curl libidn sipcalc gawk git patch bash python3
|
- apk add --no-cache curl grep libidn sipcalc gawk git patch bash python3
|
||||||
- bash generate.sh
|
- bash generate.sh
|
||||||
|
- name: create release tag
|
||||||
|
image: alpine:latest
|
||||||
|
environment:
|
||||||
|
GITEA_API_KEY:
|
||||||
|
from_secret: gitea_api_key
|
||||||
|
commands:
|
||||||
|
- apk add --no-cache curl
|
||||||
|
- sh tag.sh
|
||||||
|
when:
|
||||||
|
branch:
|
||||||
|
- master
|
||||||
- name: release
|
- name: release
|
||||||
image: plugins/gitea-release
|
image: plugins/gitea-release
|
||||||
settings:
|
settings:
|
||||||
@ -18,8 +29,8 @@ steps:
|
|||||||
checksum:
|
checksum:
|
||||||
- sha256
|
- sha256
|
||||||
when:
|
when:
|
||||||
branch:
|
event:
|
||||||
- master
|
- tag
|
||||||
|
|
||||||
trigger:
|
trigger:
|
||||||
event:
|
event:
|
||||||
|
13
tag.sh
Executable file
13
tag.sh
Executable file
@ -0,0 +1,13 @@
|
|||||||
|
#!/bin/sh
|
||||||
|
set -eux
|
||||||
|
export VERSION=`date +'%Y-%m-%d %R:%S'`
|
||||||
|
curl -X 'POST' \
|
||||||
|
'https://gitea.neur0tx.site/api/v1/repos/xray-addons/geoip-geosite-with-ru-blocklist/tags' \
|
||||||
|
-H 'accept: application/json' \
|
||||||
|
-H 'Authorization: GITEA_API_KEY' \
|
||||||
|
-H 'Content-Type: application/json' \
|
||||||
|
-d '{
|
||||||
|
"message": "'"$VERSION"': daily release from ci",
|
||||||
|
"tag_name": "'"$VERSION"'",
|
||||||
|
"target": "master"
|
||||||
|
}'
|
Loading…
Reference in New Issue
Block a user