This commit is contained in:
parent
b81abe384a
commit
c18d2c708d
20
.gitea/workflows/common_build/action.yml
Normal file
20
.gitea/workflows/common_build/action.yml
Normal file
@ -0,0 +1,20 @@
|
||||
name: Build
|
||||
runs:
|
||||
using: "composite"
|
||||
steps:
|
||||
- name: Check out repository code
|
||||
uses: actions/checkout@v4
|
||||
with:
|
||||
fetch-depth: 0
|
||||
- name: Fetch tags
|
||||
run: git fetch --tags -p
|
||||
- uses: actions/setup-java@v4
|
||||
with:
|
||||
distribution: 'temurin'
|
||||
java-version: '17'
|
||||
- name: Setup Android SDK
|
||||
uses: android-actions/setup-android@v3
|
||||
- name: Configure gradle...
|
||||
run: mkdir -p ~/.gradle && echo "org.gradle.daemon=false\nignoreGitVersion=true\nsystemProp.org.gradle.internal.http.connectionTimeout=180000\nsystemProp.org.gradle.internal.http.socketTimeout=180000" >> ~/.gradle/gradle.properties
|
||||
- name: Build and test
|
||||
run: ./gradlew build --stacktrace
|
@ -1,4 +1,4 @@
|
||||
name: Tag
|
||||
name: Create tag
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
@ -6,13 +6,19 @@ on:
|
||||
|
||||
jobs:
|
||||
createTagAndChangelog:
|
||||
needs: BuildAndTest
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Check out repository code
|
||||
uses: actions/checkout@v4
|
||||
with:
|
||||
fetch-depth: 0
|
||||
- name: Build
|
||||
uses: ./.gitea/workflows/common_build
|
||||
- name: Config git
|
||||
run: |
|
||||
git config --global user.email ${{ secrets.GIT_EMAIL }}
|
||||
git config --global user.name ${{ secrets.GIT_USER }}
|
||||
- name: Generating changelog
|
||||
- name: Creating the tag
|
||||
run: |
|
||||
git fetch --tags -p
|
||||
@ -24,18 +30,16 @@ jobs:
|
||||
CHANGELOG=$(git log $PREV..HEAD --pretty="- %s")
|
||||
echo "**$VER**\n\n$CHANGELOG\n\n--------------------------------------------------------------------\n\n$(cat CHANGELOG.md)" > CHANGELOG.md
|
||||
git add CHANGELOG.md
|
||||
git config --global user.email "aminecmi+giteadrone@pm.me"
|
||||
git config --global user.name "Gitea actions runner"
|
||||
git commit -m "Changelog for $VER"
|
||||
git push --tags
|
||||
- name: copy file via ssh password
|
||||
uses: appleboy/scp-action@v0.1.7
|
||||
uses: appleboy/scp-action@master
|
||||
with:
|
||||
host: amine-bouabdallaoui.fr
|
||||
username: ubuntu
|
||||
key: ${{ secrets.PRIVATE_KEY }}
|
||||
source: "version.txt"
|
||||
target: "/home/ubuntu/"
|
||||
target: /home/ubuntu/
|
||||
- name: deploy version file
|
||||
uses: appleboy/ssh-action@v1.2.0
|
||||
with:
|
||||
|
@ -1,11 +1,11 @@
|
||||
name: Push/PR Steps
|
||||
name: Check PR
|
||||
on:
|
||||
pull_request:
|
||||
branches:
|
||||
- master
|
||||
|
||||
jobs:
|
||||
Lint:
|
||||
checkPRCode:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Check out repository code
|
||||
@ -21,4 +21,6 @@ jobs:
|
||||
- name: Linting...
|
||||
run: ktlint 'shared/**/*.kt' 'androidApp/**/*.kt' '!shared/build' || true
|
||||
- name: Detecting...
|
||||
run: ./detekt-cli-1.23.1/bin/detekt-cli --all-rules --excludes '**/shared/build/**/*.kt' || true
|
||||
run: ./detekt-cli-1.23.1/bin/detekt-cli --all-rules --excludes '**/shared/build/**/*.kt' || true
|
||||
- name: Build
|
||||
uses: ./.gitea/workflows/common_build
|
@ -1,30 +1,12 @@
|
||||
name: Push/PR Steps
|
||||
name: Check master code
|
||||
on:
|
||||
pull_request:
|
||||
branches:
|
||||
- master
|
||||
push:
|
||||
branches:
|
||||
- master
|
||||
- release
|
||||
|
||||
jobs:
|
||||
BuildAndTest:
|
||||
checkMasterCode:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Check out repository code
|
||||
uses: actions/checkout@v4
|
||||
with:
|
||||
fetch-depth: 0
|
||||
- name: Fetch tags
|
||||
run: git fetch --tags -p
|
||||
- uses: actions/setup-java@v4
|
||||
with:
|
||||
distribution: 'temurin'
|
||||
java-version: '17'
|
||||
- name: Setup Android SDK
|
||||
uses: android-actions/setup-android@v3
|
||||
- name: Configure gradle...
|
||||
run: mkdir -p ~/.gradle && echo "org.gradle.daemon=false\nignoreGitVersion=true\nsystemProp.org.gradle.internal.http.connectionTimeout=180000\nsystemProp.org.gradle.internal.http.socketTimeout=180000" >> ~/.gradle/gradle.properties
|
||||
- name: Build and test
|
||||
run: ./gradlew build --stacktrace
|
||||
- name: Build
|
||||
uses: ./.gitea/workflows/common_build
|
@ -1,4 +1,4 @@
|
||||
name: Tag
|
||||
name: Create release
|
||||
on:
|
||||
push:
|
||||
tags:
|
||||
|
@ -1,4 +1,4 @@
|
||||
# ReaderForSelfoss-multiplatform [![Build Status](https://build.amine-bouabdallaoui.fr/api/badges/Louvorg/ReaderForSelfoss-multiplatform/status.svg)](https://build.amine-bouabdallaoui.fr/Louvorg/ReaderForSelfoss-multiplatform)
|
||||
# ReaderForSelfoss-multiplatform [![Build Status](https://gitea.amine-bouabdallaoui.fr/Louvorg/ReaderForSelfoss-multiplatform/actions/workflows/on_push.yml/badge.svg)](https://gitea.amine-bouabdallaoui.fr/Louvorg/ReaderForSelfoss-multiplatform/actions?workflow=on_push.yml&actor=0&status=0)
|
||||
|
||||
[![Crowdin](https://d322cqt584bo4o.cloudfront.net/readerforselfoss/localized.svg)](https://crowdin.com/project/readerforselfoss)
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user