Create dedicated release job
@@ -39,8 +39,34 @@ jobs:
with:
name: reports-${{ runner.os }}
path: build/
+
+ release:
+ name: 'Release'
+ needs: build
+ if: github.event_name == 'push' && github.repository == 'kordamp/jreleaser' && github.ref == 'refs/heads/main'
+ 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
+ - uses: actions/cache@v1
+ with:
+ path: ~/.gradle/caches
+ key: ${{ runner.os }}-gradle-cache-${{ hashFiles('**/*.gradle') }}-${{ hashFiles('**/gradle.properties') }}
+ restore-keys: |
+ ${{ runner.os }}-gradle-
+ - uses: actions/cache@v1
+ with:
+ path: ~/.gradle/wrapper
+ key: ${{ runner.os }}-gradle-wrapper-${{ hashFiles('**/gradlew') }}
+ restore-keys: |
+ ${{ runner.os }}-gradlew-
+ - uses: eskatos/gradle-command-action@v1
+ with:
+ arguments: build -S
- name: 'Release early-access artifacts'
- if: github.ref == 'refs/heads/main' && ${{ matrix.os }} == 'ubuntu-latest'
uses: marvinpinto/action-automatic-releases@latest
with:
automatic_release_tag: 'early-access'
