Last active
July 4, 2020 10:53
-
-
Save ktvipin27/ed6d79e387b95eb075d757fb44597e3e to your computer and use it in GitHub Desktop.
Workflow file for automating github release and bintray upload
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Release | |
on: | |
push: | |
tags: | |
- 'v*' | |
jobs: | |
release: | |
name: Create Release | |
runs-on: macos-latest | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v2 | |
- name: Set release name | |
run: echo ::set-env name=RELEASE_NAME::$(echo ${GITHUB_REF:11}) | |
- name: Create release | |
id: create_release | |
uses: actions/create-release@v1 | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
with: | |
tag_name: ${{ github.ref }} | |
release_name: ${{ env.RELEASE_NAME }} | |
draft: false | |
prerelease: false | |
publish: | |
name: Publish Build | |
runs-on: ubuntu-latest | |
needs: release | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v2 | |
- name: Configure JDK | |
uses: actions/setup-java@v1 | |
with: | |
java-version: 1.8 | |
- name: Publish library | |
env: | |
bintrayUser: ${{ secrets.BINTRAY_USER }} | |
bintrayApiKey: ${{ secrets.BINTRAY_API_KEY }} | |
run: ./gradlew bintrayUpload |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment