chore: Gitea Action
Some checks failed
Check master code / build (push) Has been cancelled
Create tag / build (push) Successful in 7m37s
Create tag / createTagAndChangelog (push) Failing after 25s

This commit is contained in:
aminecmi 2024-11-23 15:19:29 +01:00
parent b81abe384a
commit 30b2b040b5
6 changed files with 51 additions and 40 deletions

View File

@ -0,0 +1,24 @@
name: Build
on:
workflow_call:
jobs:
BuildAndTest:
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

View File

@ -1,18 +1,25 @@
name: Tag name: Create tag
on: on:
push: push:
branches: branches:
- release - release
jobs: jobs:
build:
uses: ./.gitea/workflows/common_build.yml
createTagAndChangelog: createTagAndChangelog:
needs: BuildAndTest
runs-on: ubuntu-latest runs-on: ubuntu-latest
needs: build
steps: steps:
- name: Check out repository code - name: Check out repository code
uses: actions/checkout@v4 uses: actions/checkout@v4
with: with:
fetch-depth: 0 fetch-depth: 0
persist-credentials: false
- name: Config git
run: |
git config --global user.email aminecmi+gitea@pm.me
git config --global user.name Gitea
- name: Creating the tag - name: Creating the tag
run: | run: |
git fetch --tags -p git fetch --tags -p
@ -24,18 +31,18 @@ jobs:
CHANGELOG=$(git log $PREV..HEAD --pretty="- %s") CHANGELOG=$(git log $PREV..HEAD --pretty="- %s")
echo "**$VER**\n\n$CHANGELOG\n\n--------------------------------------------------------------------\n\n$(cat CHANGELOG.md)" > CHANGELOG.md echo "**$VER**\n\n$CHANGELOG\n\n--------------------------------------------------------------------\n\n$(cat CHANGELOG.md)" > CHANGELOG.md
git add 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 commit -m "Changelog for $VER"
git push --tags TAG="v$VER"
git push origin ${TAG}
git push origin master
- name: copy file via ssh password - name: copy file via ssh password
uses: appleboy/scp-action@v0.1.7 uses: garygrossgarten/github-action-scp@release
with: with:
host: amine-bouabdallaoui.fr host: amine-bouabdallaoui.fr
username: ubuntu username: ubuntu
key: ${{ secrets.PRIVATE_KEY }} privateKey: ${{ secrets.PRIVATE_KEY }}
source: "version.txt" local: version.txt
target: "/home/ubuntu/" target: /home/ubuntu/
- name: deploy version file - name: deploy version file
uses: appleboy/ssh-action@v1.2.0 uses: appleboy/ssh-action@v1.2.0
with: with:

View File

@ -1,4 +1,4 @@
name: Push/PR Steps name: Check PR code
on: on:
pull_request: pull_request:
branches: branches:
@ -21,4 +21,6 @@ jobs:
- name: Linting... - name: Linting...
run: ktlint 'shared/**/*.kt' 'androidApp/**/*.kt' '!shared/build' || true run: ktlint 'shared/**/*.kt' 'androidApp/**/*.kt' '!shared/build' || true
- name: Detecting... - 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
build:
uses: ./.gitea/workflows/common_build.yml

View File

@ -1,30 +1,9 @@
name: Push/PR Steps name: Check master code
on: on:
pull_request:
branches:
- master
push: push:
branches: branches:
- master - master
- release
jobs: jobs:
BuildAndTest: build:
runs-on: ubuntu-latest uses: ./.gitea/workflows/common_build.yml
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

View File

@ -1,11 +1,10 @@
name: Tag name: Create release
on: on:
push: push:
tags: tags:
- 'v*'
jobs: jobs:
build: release:
steps: steps:
- name: Check out repository code - name: Check out repository code
uses: actions/checkout@v4 uses: actions/checkout@v4

View File

@ -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) [![Crowdin](https://d322cqt584bo4o.cloudfront.net/readerforselfoss/localized.svg)](https://crowdin.com/project/readerforselfoss)