2 Commits

Author SHA1 Message Date
22de4264ed Reset version number
Some checks failed
Pull Request Pipeline / Lint (pull_request) Has been skipped
Pull Request Pipeline / Test (pull_request) Has been skipped
Pull Request Pipeline / Format (pull_request) Has been skipped
Pull Request Pipeline / Update Version (pull_request) Failing after 4s
2026-01-17 21:05:07 +01:00
d1e13ee8aa Updated push workflow accordingly 2026-01-17 21:04:34 +01:00
2 changed files with 55 additions and 20 deletions

View File

@@ -7,9 +7,9 @@ on:
- "main"
jobs:
format:
Format:
runs-on: ubuntu-latest
if: false # Needs bot user
if: false
steps:
- name: Checkout code
uses: actions/checkout@v4
@@ -21,30 +21,65 @@ jobs:
- name: Install Flutter (wget)
run: |
wget https://storage.googleapis.com/flutter_infra_release/releases/stable/linux/flutter_linux_3.38.2-stable.tar.xz
wget --progress=dot:giga https://storage.googleapis.com/flutter_infra_release/releases/stable/linux/flutter_linux_3.38.2-stable.tar.xz
tar xf flutter_linux_3.38.2-stable.tar.xz
# Set Git safe directory for Flutter path
git config --global --add safe.directory "$(pwd)/flutter"
# Set Flutter path
echo "$(pwd)/flutter/bin" >> $GITHUB_PATH
- name: Get & upgrade dependencies
run: |
flutter pub get
flutter pub upgrade --major-versions
- name: Get dependencies
run: flutter pub get
- name: Auto-format
run: |
dart format lib
dart fix --apply lib
- name: Check code format
id: check_format
continue-on-error: true
run: flutter analyze lib test
# Needs credentials, push access and the right files need to be staged
- name: Commit Changes
- name: Format code
if: steps.check_format.outcome == 'failure'
run: |
git config --global user.name "Gitea Actions"
git fetch origin ${{ gitea.head_ref }}
git checkout ${{ gitea.head_ref }}
dart fix --apply lib
dart fix --apply test
if [ -n "$(git status --porcelain lib test)" ]; then
git config --global user.name "Gitea Actions [bot]"
git config --global user.email "actions@gitea.com"
git add lib test
git commit -m "Auto-format code"
git push
else
echo "No changes to commit"
fi
- name: Verify format
run: flutter analyze lib test
Update Version:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Update version
uses: https://github.com/stikkyapp/update-pubspec-version@v2
with:
strategy: 'minor'
path: './pubspec.yaml'
- name: Commit version update
run: |
git fetch origin ${{ gitea.head_ref }}
git checkout ${{ gitea.head_ref }}
git config --global user.name "Gitea Actions [bot]"
git config --global user.email "actions@gitea.com"
git status
git add lib/
git status
git commit -m "Actions: Auto-formatting [skip ci]"
git push
git add pubspec.yaml
git commit -m "Updated version number"
git push

View File

@@ -1,7 +1,7 @@
name: game_tracker
description: "Game Tracking App for Card Games"
publish_to: 'none'
version: 0.1.1+218
version: 0.0.7+218
environment:
sdk: ^3.8.1