在 master 提交后,我想使用 Travis 在 Github Releases 中创建好帖子
这就是我需要的:
- 建立自定义标题
- 建立自定义描述
- 仅发布没有源代码 zip 的构建
我尽我所能,但我只能将二进制文件添加到发行版中。这是我的配置:
language: java
sudo: false
install: gradle wrapper --gradle-version 4.2
jdk:
- oraclejdk8
script:
- chmod +x gradlew
- "./gradlew test"
- "./gradlew build"
- "./gradlew jar"
- cd build # test
- ls
- cd libs
- ls
- pwd
- echo $TRAVIS_BUILD_NUMBER
cache:
directories:
- "$HOME/.gradle"
- ".gradle"
before_deploy:
# Set up git user name and tag this commit
- git config --local user.name "RareScrap"
- git config --local user.email "RareScrap@users.noreply.github.com"
- export GIT_TAG=$TRAVIS_BRANCH-v0.1.$TRAVIS_BUILD_NUMBER
- git tag $GIT_TAG -a -m "Generated tag from TravisCI for build $TRAVIS_BUILD_NUMBER"
deploy:
provider: releases
api_key:
secure: [redacted]
file: "/home/travis/build/RareScrap/travis.test/build/libs/*"
skip_cleanup: true
file_glob: true
on:
repo: RareScrap/travis.test
branches: # ← new! ghjgjghjghjghj
only: # ← new!
- master # ← new!