name: Release Tagged Builds

on:
  push: 
    tags: 
    - '*'

jobs:
  build:
    runs-on: ubuntu-latest

    steps:
    - uses: actions/checkout@v2
    - name: Set up JDK 1.8
      uses: actions/setup-java@v1
      with:
        java-version: 1.8
    - name: Set release version
      run: echo "::set-env name=RELEASE_VERSION::${GITHUB_REF##*/}"
    - name: Build with JCompilo
      run: ./jcompilo.sh
      env:
        BUILD_NUMBER: "$RELEASE_VERSION"
    - name: Publish to Bintray
      run: bin/publish "$RELEASE_VERSION" "$BINTRAY_USERNAME" "$BINTRAY_PASSWORD"
      env:
        BINTRAY_USERNAME: ${{ secrets.BINTRAY_USERNAME }}
        BINTRAY_PASSWORD: ${{ secrets.BINTRAY_PASSWORD }}

name: Release Tagged Builds

on:
  push: 
    tags: 
    - '*'

jobs:
  build:
    runs-on: ubuntu-latest

    steps:
    - uses: actions/checkout@v2
    - name: Set up JDK 1.8
      uses: actions/setup-java@v1
      with:
        java-version: 1.8
    - name: Set release version
      run: echo "::set-output name=RELEASE_VERSION::${GITHUB_REF##*/}"
    - name: Build with JCompilo
      run: ./jcompilo.sh
      env:
        BUILD_NUMBER: ${{ outputs.RELEASE_VERSION }}
    - name: Publish to Bintray
      run: bin/publish "$RELEASE_VERSION" "$BINTRAY_USERNAME" "$BINTRAY_PASSWORD"
      env:
        RELEASE_VERSION: ${{ outputs.RELEASE_VERSION }}
        BINTRAY_USERNAME: ${{ secrets.BINTRAY_USERNAME }}
        BINTRAY_PASSWORD: ${{ secrets.BINTRAY_PASSWORD }}

Change release flow to set build number via an output, as the reuse of the env var seems dodgy
Change release flow to set build number via an output, as the reuse of the env var seems dodgy
