name: CF CI

on:
  push:
    branches:
      - 3.x
      - 4.x-unstable

jobs:
  build:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v1
      - name: Set up JDK 1.8
        uses: actions/setup-java@v1
        with:
          java-version: 1.8
      - name: Upload to CurseForge
        run: ./gradlew clean build releaseOnCf --refresh-dependencies --stacktrace
        env:
          danielshe_curse_api_key: ${{ secrets.CF_API_KEY }}
          BRANCH_NAME: ${{ github.ref }}