release a new tag build workflow #20
Workflow file for this run
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 a new tag build workflow | |
on: | |
create: | |
tags: | |
- '*' | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v2 | |
with: | |
# bring in all history because the gradle versions plugin needs to "walk back" to the closest ancestor tag | |
fetch-depth: 0 | |
- name: Set up JDK 1.8 | |
uses: actions/setup-java@v1 | |
with: | |
java-version: 1.8 | |
- name: Build with Gradle | |
# add --info or --debug below for more details when trying to understand issues | |
run: ./gradlew clean build --stacktrace --no-daemon | |
- name: Branch tag | |
id: branch_tag | |
run: echo ::set-output name=RELEASE_TAG::${GITHUB_REF#refs/tags/} | |
- name: Publish to Jfrog | |
env: | |
JFROG_USER: ${{ secrets.JFROG_USER }} | |
JFROG_KEY: ${{ secrets.JFROG_KEY }} | |
SOURCE_TAG: ${{ steps.branch_tag.outputs.RELEASE_TAG }} | |
run: | | |
chmod +x ./scripts/publishToJfrog.sh | |
./scripts/publishToJfrog.sh | |