Skip to content

Commit

Permalink
fix release upload
Browse files Browse the repository at this point in the history
  • Loading branch information
xoxys committed Aug 23, 2019
1 parent b79000a commit 3b8f0c8
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 50 deletions.
48 changes: 17 additions & 31 deletions .drone.starlark
Original file line number Diff line number Diff line change
Expand Up @@ -39,31 +39,6 @@ def pipeline_build_reva():
]
}

return {
'kind': 'pipeline',
'name': 'build-reva',
'steps': [
step_build,
step_exec,
step_checksum,
],
}


def pipeline_release_reva():
base_dir = './build/reva'

step_publish_release = {
'name': 'publish-release',
'image': 'plugins/github-release',
'settings': {
'api_key': { 'from_secret': 'github_token'},
'overwrite': True,
'files': [base_dir + '/release/*'],
'title': "${DRONE_TAG}",
},
}

# step_publish_daily = {
# 'name': 'publish-daily',
# 'image': 'plugins/github-release',
Expand All @@ -79,23 +54,34 @@ def pipeline_release_reva():
# },
# }

step_publish_release = {
'name': 'publish-release',
'image': 'plugins/github-release',
'settings': {
'api_key': { 'from_secret': 'github_token'},
'overwrite': True,
'files': [base_dir + '/release/*'],
'title': "${DRONE_TAG}",
},
}

return {
'kind': 'pipeline',
'name': 'publish-reva',
'name': 'build-reva',
'steps': [
step_build,
step_exec,
step_checksum,
step_publish_release,
# step_publish_daily,
],
'depends_on': [
"build-reva",
],
'trigger': {
'when': {
'ref': [ 'refs/tags/**' ],
},
}


def main():
return [
pipeline_build_reva(),
pipeline_release_reva()
]
20 changes: 1 addition & 19 deletions .drone.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,33 +32,15 @@ steps:
commands:
- apk add --no-cache coreutils
- "sha256sum -b ./build/reva/release/* > ./build/reva/release/sha256sum.txt"
- ls -l ./build/reva/release/

---
kind: pipeline
name: publish-reva

platform:
os: linux
arch: amd64

steps:
- name: publish-release
image: plugins/github-release
settings:
api_key:
from_secret: github_token
files:
- build/reva/release/revad
- build/reva/release/sha256sum.txt
- "./build/reva/release/*"
overwrite: true
title: "${DRONE_TAG}"

trigger:
ref:
- "refs/tags/**"

depends_on:
- build-reva

...

0 comments on commit 3b8f0c8

Please sign in to comment.