name: Release Add-On

on:
  push:
    branches:
      - main
    paths:
      - 'addOns/**/gradle.properties'

jobs:
  release:
    name: Build and Release Add-On
    runs-on: ubuntu-latest
    steps:
    - uses: actions/checkout@v2
      with:
        fetch-depth: 0
        persist-credentials: false
    - name: Setup Java
      uses: actions/setup-java@v1
      with:
        java-version: 8
    - name: Generate Release State
      run: ./gradlew :addOns:generateReleaseStateLastCommit
    - name: Build and Release Add-On
      env:
        ZAPBOT_TOKEN: ${{ secrets.ZAPBOT_TOKEN }}
      run: ./gradlew :addOns:releaseAddOn

name: Release Add-On

on:
  push:
    branches:
      - main
    paths:
      - 'addOns/**/gradle.properties'

jobs:
  release:
    name: Build and Release Add-On
    runs-on: ubuntu-latest
    steps:
    - uses: actions/checkout@v2
      with:
        fetch-depth: 0
        persist-credentials: false
    - name: Setup Java
      uses: actions/setup-java@v1
      with:
        java-version: 8
    - name: Generate Release State
      run: ./gradlew :addOns:generateReleaseStateLastCommit
    - name: Build and Release Add-On
      env:
        ZAPBOT_TOKEN: ${{ secrets.ZAPBOT_TOKEN }}
        CROWDIN_AUTH_TOKEN: ${{ secrets.ZAPBOT_CROWDIN_TOKEN }}
      run: ./gradlew :addOns:releaseAddOn

Include zapbot Crowdin auth token for releases
Include zapbot Crowdin auth token for releases

The auth token is required to upload the source files to Crowdin when
the add-ons are released.

Signed-off-by: thc202 <43af82ef30812a20fbcf38b99a6f72cdd3a89ac1@gmail.com>
