mirror of
https://github.com/tuskyapp/Tusky
synced 2025-01-09 07:28:41 +01:00
improve github action setup (#4718)
This commit is contained in:
parent
9bb1329665
commit
a366d49ad7
18
.github/actions/setup/action.yml
vendored
Normal file
18
.github/actions/setup/action.yml
vendored
Normal file
@ -0,0 +1,18 @@
|
||||
name: 'Setup build environment'
|
||||
description: 'Sets up an environment for building Tusky'
|
||||
runs:
|
||||
using: "composite"
|
||||
steps:
|
||||
- uses: actions/setup-java@v4
|
||||
with:
|
||||
java-version: '21'
|
||||
distribution: 'temurin'
|
||||
|
||||
- name: Copy CI gradle.properties
|
||||
shell: bash
|
||||
run: mkdir -p ~/.gradle ; cp .github/ci-gradle.properties ~/.gradle/gradle.properties
|
||||
|
||||
- name: Gradle Build Action
|
||||
uses: gradle/actions/setup-gradle@v4
|
||||
with:
|
||||
cache-read-only: ${{ github.ref != 'refs/heads/main' && github.ref != 'refs/heads/develop' }}
|
14
.github/workflows/check-and-build.yml
vendored
14
.github/workflows/check-and-build.yml
vendored
@ -11,18 +11,8 @@ jobs:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v4
|
||||
|
||||
- uses: actions/setup-java@v4
|
||||
with:
|
||||
java-version: '21'
|
||||
distribution: 'temurin'
|
||||
|
||||
- name: Copy CI gradle.properties
|
||||
run: mkdir -p ~/.gradle ; cp .github/ci-gradle.properties ~/.gradle/gradle.properties
|
||||
|
||||
- name: Gradle Build Action
|
||||
uses: gradle/actions/setup-gradle@v4
|
||||
with:
|
||||
cache-read-only: ${{ github.ref != 'refs/heads/main' && github.ref != 'refs/heads/develop' }}
|
||||
- name: Setup
|
||||
uses: ./.github/actions/setup
|
||||
|
||||
- name: ktlint
|
||||
run: ./gradlew clean ktlintCheck
|
||||
|
8
.github/workflows/deploy-release.yml
vendored
8
.github/workflows/deploy-release.yml
vendored
@ -8,13 +8,17 @@ on:
|
||||
- '*'
|
||||
|
||||
jobs:
|
||||
build:
|
||||
check-and-build:
|
||||
uses: ./.github/workflows/check-and-build.yml
|
||||
deploy:
|
||||
runs-on: ubuntu-latest
|
||||
needs: check-and-build
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v4
|
||||
|
||||
- uses: ./.github/workflows/check-and-build.yml
|
||||
- name: Setup
|
||||
uses: ./.github/actions/setup
|
||||
|
||||
- name: Build Blue aab
|
||||
run: ./gradlew app:bundleBlueRelease
|
||||
|
8
.github/workflows/deploy-test.yml
vendored
8
.github/workflows/deploy-test.yml
vendored
@ -8,13 +8,17 @@ on:
|
||||
- develop
|
||||
|
||||
jobs:
|
||||
build:
|
||||
check-and-build:
|
||||
uses: ./.github/workflows/check-and-build.yml
|
||||
deploy:
|
||||
runs-on: ubuntu-latest
|
||||
needs: check-and-build
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v4
|
||||
|
||||
- uses: ./.github/workflows/check-and-build.yml
|
||||
- name: Setup
|
||||
uses: ./.github/actions/setup
|
||||
|
||||
- name: Build Green aab
|
||||
run: ./gradlew app:bundleGreenRelease
|
||||
|
Loading…
Reference in New Issue
Block a user