74 lines
2.1 KiB
YAML
74 lines
2.1 KiB
YAML
name: Pull Request Pipeline
|
|
|
|
on:
|
|
pull_request:
|
|
|
|
jobs:
|
|
update_version:
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- name: Checkout code
|
|
uses: actions/checkout@v4
|
|
with:
|
|
fetch-depth: 0
|
|
token: ${{ secrets.BOT_TOKEN }}
|
|
ref: ${{ gitea.head_ref }}
|
|
|
|
- name: Increment version number
|
|
uses: stikkyapp/update-pubspec-version@v2
|
|
with:
|
|
strategy: 'patch'
|
|
path: './pubspec.yaml'
|
|
|
|
|
|
- name: Commit version update
|
|
env:
|
|
GITEA_TOKEN: ${{ secrets.BOT_TOKEN }}
|
|
run: |
|
|
git config --global user.name "Gitea Actions [bot]"
|
|
git config --global user.email "actions@yannick-weigert.de"
|
|
git add pubspec.yaml
|
|
git commit -m "Updated version number [skip ci]"
|
|
git push origin HEAD:${{ gitea.head_ref }}
|
|
|
|
|
|
lint:
|
|
runs-on: ubuntu-latest
|
|
if: false
|
|
steps:
|
|
- name: Checkout code
|
|
uses: actions/checkout@v4
|
|
|
|
- name: Install Flutter (wget)
|
|
run: |
|
|
wget --show-progress --progress=bar:force:noscroll: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
|
|
git config --global --add safe.directory "$(pwd)/flutter"
|
|
echo "$(pwd)/flutter/bin" >> $GITEA_PATH
|
|
|
|
- name: Get dependencies
|
|
run: flutter pub get
|
|
|
|
- name: Analyze Formatting
|
|
run: flutter analyze lib test
|
|
|
|
test:
|
|
if: false
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- name: Checkout code
|
|
uses: actions/checkout@v4
|
|
|
|
- name: Install Flutter (wget)
|
|
run: |
|
|
wget --show-progress --progress=bar:force:noscroll: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
|
|
git config --global --add safe.directory "$(pwd)/flutter"
|
|
echo "$(pwd)/flutter/bin" >> $GITEA_PATH
|
|
|
|
- name: Get dependencies
|
|
run: flutter pub get
|
|
|
|
- name: Run tests
|
|
run: flutter test
|