# This workflow will build a package using Gradle and then publish it to GitHub packages when a release is created # For more information see: https://github.com/actions/setup-java#publishing-using-gradle name: release on: push: tags: - 'v*' jobs: release: runs-on: ubuntu-latest steps: - uses: actions/checkout@v2 - name: Set up JDK 11 uses: actions/setup-java@v1 with: java-version: '11' server-id: github # Value of the distributionManagement/repository/id field of the pom.xml settings-path: ${{ github.workspace }} # location for the settings.xml file - name: add permission to gradle run: chmod +x ./gradlew - name: build with gradle run: ./gradlew api:build -x checkstyleMain -x checkstyleTest - name: release jar uses: softprops/action-gh-release@v1 if: startsWith(github.ref, 'refs/tags/') with: files: api/build/libs/databasir.jar draft: true fail_on_unmatched_files: true env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}