forked from LBRYCommunity/lbry-sdk
upload assets from gitlab CI to github on a tagged release
also disables travis asset uploading
This commit is contained in:
parent
51af43d492
commit
d0b70ea6df
2 changed files with 47 additions and 36 deletions
|
@ -134,8 +134,9 @@ build:windows:
|
||||||
- dist/lbrynet.exe --version
|
- dist/lbrynet.exe --version
|
||||||
|
|
||||||
|
|
||||||
# upload could be done by making it a yaml alias and putting it right into the build step. that way if one OS fails, the others still get uploaded
|
# s3 = upload asset to s3 (build.lbry.io)
|
||||||
.upload:
|
# could be done by making it a yaml alias and putting it right into the build step. that way if one OS fails, the others still get uploaded
|
||||||
|
.s3:
|
||||||
stage: release
|
stage: release
|
||||||
variables:
|
variables:
|
||||||
GIT_STRATEGY: none
|
GIT_STRATEGY: none
|
||||||
|
@ -146,34 +147,44 @@ build:windows:
|
||||||
aws s3 cp lbrynet-${OS}.zip s3://${ARTIFACTS_BUCKET}/${S3_PATH}/lbrynet-${OS}.zip
|
aws s3 cp lbrynet-${OS}.zip s3://${ARTIFACTS_BUCKET}/${S3_PATH}/lbrynet-${OS}.zip
|
||||||
|
|
||||||
s3:linux:
|
s3:linux:
|
||||||
extends: .upload
|
extends: .s3
|
||||||
variables:
|
variables: {OS: linux}
|
||||||
OS: linux
|
dependencies: ["build:linux"]
|
||||||
dependencies:
|
|
||||||
- build:linux
|
|
||||||
|
|
||||||
s3:mac:
|
s3:mac:
|
||||||
extends: .upload
|
extends: .s3
|
||||||
variables:
|
variables: {OS: mac}
|
||||||
OS: mac
|
dependencies: ["build:mac"]
|
||||||
dependencies:
|
|
||||||
- build:mac
|
|
||||||
|
|
||||||
s3:windows:
|
s3:windows:
|
||||||
extends: .upload
|
extends: .s3
|
||||||
|
variables: {OS: windows}
|
||||||
|
dependencies: ["build:windows"]
|
||||||
|
|
||||||
|
# release = upload assets to github when there's a tagged release
|
||||||
|
.release:
|
||||||
|
stage: release
|
||||||
|
rules:
|
||||||
|
- if: '$CI_COMMIT_TAG =~ /^v[0-9\.]+$/'
|
||||||
|
when: on_success
|
||||||
variables:
|
variables:
|
||||||
OS: windows
|
GIT_STRATEGY: none
|
||||||
dependencies:
|
script:
|
||||||
- build:windows
|
- pip install githubrelease
|
||||||
|
- githubrelease --no-progress --github-token ${GITHUB_CI_USER_ACCESS_TOKEN} asset lbryio/lbry-sdk upload ${CI_COMMIT_TAG} lbrynet-${OS}.zip
|
||||||
|
|
||||||
#release:linux:
|
release:linux:
|
||||||
# stage: release
|
extends: .release
|
||||||
# only: [tags]
|
variables: {OS: linux}
|
||||||
# variables:
|
dependencies: ["build:linux"]
|
||||||
# OS: linux
|
|
||||||
# GIT_STRATEGY: none
|
release:mac:
|
||||||
# dependencies: [build:linux]
|
extends: .release
|
||||||
# script:
|
variables: {OS: mac}
|
||||||
# - pip install githubrelease
|
dependencies: ["build:mac"]
|
||||||
# - githubrelease asset lbryio/lbry-sdk upload ${CI_COMMIT_TAG} lbrynet-${OS}.zip
|
|
||||||
|
release:windows:
|
||||||
|
extends: .release
|
||||||
|
variables: {OS: windows}
|
||||||
|
dependencies: ["build:windows"]
|
||||||
|
|
||||||
|
|
20
.travis.yml
20
.travis.yml
|
@ -70,16 +70,16 @@ jobs:
|
||||||
- aws configure set region us-east-1
|
- aws configure set region us-east-1
|
||||||
- export S3_PATH="daemon/build-${TRAVIS_BUILD_NUMBER}_commit-${TRAVIS_COMMIT:0:7}_branch-${TRAVIS_BRANCH}$([ ! -z ${TRAVIS_TAG} ] && echo _tag-${TRAVIS_TAG})"
|
- export S3_PATH="daemon/build-${TRAVIS_BUILD_NUMBER}_commit-${TRAVIS_COMMIT:0:7}_branch-${TRAVIS_BRANCH}$([ ! -z ${TRAVIS_TAG} ] && echo _tag-${TRAVIS_TAG})"
|
||||||
- aws s3 cp lbrynet-${OS}.zip s3://build.lbry.io/${S3_PATH}/lbrynet-${OS}.zip
|
- aws s3 cp lbrynet-${OS}.zip s3://build.lbry.io/${S3_PATH}/lbrynet-${OS}.zip
|
||||||
deploy:
|
# deploy:
|
||||||
provider: releases
|
# provider: releases
|
||||||
api_key:
|
# api_key:
|
||||||
secure: "unnR+aSJ1937Cl1PyBBZzGuZvV5W5TGcXELhXTgyOeeI6FgO/j80qmbNxJDA7qdFH/hvVicQFWoflhZu2dxN5rYP5BQJW3q3XoOLY3XAc1s1vicFkwqn3TIfdFiJTz+/D9eBUBBhHKeYFxm3M+thvklTLgjKl6fflh14NfGuNTevK9yQke8wewW3f9UmFTo1qNOPF1OsTZRbwua6oQYa59P+KukoPt4Dsu1VtILtTkj7hfEsUL79cjotwO3gkhYftxbl/xeDSZWOt+9Nhb8ZKmQG/uDx4JiTMm5lWRk4QB7pUujZ1CftxCYWz/lJx9nuJpdCOgP624tcHymErNlD+vGLwMTNslcXGYkAJH6xvGyxBJ+Obc8vRVnZbRM26BfH34TcPK1ueRxHSrDUbzMIIUsgcoZAxBuim8uDPp+K7bGqiygzSs2vQfr9U5Jhe9/F8sPdtNctfJZEfgmthNTeVFjyNsGIfIt754uGSfACqM7wDLh6fbKx7M+FHlNyOdvYCrbKUOAYXmTikYIpVDvlaaeMO+N+uW8Rhvm1j+JU7CVwhMavLySaPVc6Dt5OxiMMmxw9mVrjW9bBPjS5AkrS5MOA13T5wapoLzH6+gE92U4HzA6ilMcwRaQPSFnK2JU7tzyt2Wy1PH4MjHowXI2WyICG1x510dD3tX1P/1px8ro="
|
# secure: "unnR+aSJ1937Cl1PyBBZzGuZvV5W5TGcXELhXTgyOeeI6FgO/j80qmbNxJDA7qdFH/hvVicQFWoflhZu2dxN5rYP5BQJW3q3XoOLY3XAc1s1vicFkwqn3TIfdFiJTz+/D9eBUBBhHKeYFxm3M+thvklTLgjKl6fflh14NfGuNTevK9yQke8wewW3f9UmFTo1qNOPF1OsTZRbwua6oQYa59P+KukoPt4Dsu1VtILtTkj7hfEsUL79cjotwO3gkhYftxbl/xeDSZWOt+9Nhb8ZKmQG/uDx4JiTMm5lWRk4QB7pUujZ1CftxCYWz/lJx9nuJpdCOgP624tcHymErNlD+vGLwMTNslcXGYkAJH6xvGyxBJ+Obc8vRVnZbRM26BfH34TcPK1ueRxHSrDUbzMIIUsgcoZAxBuim8uDPp+K7bGqiygzSs2vQfr9U5Jhe9/F8sPdtNctfJZEfgmthNTeVFjyNsGIfIt754uGSfACqM7wDLh6fbKx7M+FHlNyOdvYCrbKUOAYXmTikYIpVDvlaaeMO+N+uW8Rhvm1j+JU7CVwhMavLySaPVc6Dt5OxiMMmxw9mVrjW9bBPjS5AkrS5MOA13T5wapoLzH6+gE92U4HzA6ilMcwRaQPSFnK2JU7tzyt2Wy1PH4MjHowXI2WyICG1x510dD3tX1P/1px8ro="
|
||||||
file: lbrynet-${OS}.zip
|
# file: lbrynet-${OS}.zip
|
||||||
skip_cleanup: true
|
# skip_cleanup: true
|
||||||
overwrite: true
|
# overwrite: true
|
||||||
draft: true
|
# draft: true
|
||||||
on:
|
# on:
|
||||||
tags: true
|
# tags: true
|
||||||
|
|
||||||
- <<: *build
|
- <<: *build
|
||||||
name: "Mac"
|
name: "Mac"
|
||||||
|
|
Loading…
Reference in a new issue