Skip to content

Commit

Permalink
merge: pull request #382 from hm21:dev
Browse files Browse the repository at this point in the history
refactor(workflows): standardize step names and update Flutter channel to stable
  • Loading branch information
hm21 authored Feb 28, 2025
2 parents b718889 + 331e030 commit c4a1cd7
Show file tree
Hide file tree
Showing 3 changed files with 21 additions and 11 deletions.
7 changes: 4 additions & 3 deletions .github/workflows/flutter_analysis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,17 +13,18 @@ jobs:
steps:
- name: Clone repository
uses: actions/checkout@v4

- name: Set up Flutter
uses: subosito/flutter-action@v2
with:
channel: stable
flutter-version: 3.29.0

- name: install dependencies
- name: Install dependencies
run: flutter pub get

- name: analyze code
- name: Analyze code
run: flutter analyze .

- name: run tests
- name: Run tests
run: flutter test
13 changes: 10 additions & 3 deletions .github/workflows/gh_pages.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,19 +10,26 @@ jobs:
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
steps:
- uses: actions/checkout@v3
- uses: subosito/flutter-action@v2
- name: Clone repository
uses: actions/checkout@v4

- name: Set up Flutter
uses: subosito/flutter-action@v2
with:
channel: master
channel: stable
flutter-version: 3.29.0

- name: Install Package Dependencies
run: flutter pub get

- name: Install Example Dependencies
run: flutter pub get
working-directory: ./example

- name: Build Web
run: flutter build web --release
working-directory: ./example

- name: Deploy
run: |
cd example/build/web
Expand Down
12 changes: 7 additions & 5 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,10 @@ jobs:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v4
- name: Install Flutter
- name: Clone repository
uses: actions/checkout@v4

- name: Set up Flutter
uses: subosito/flutter-action@v2
with:
channel: stable
Expand All @@ -20,16 +22,16 @@ jobs:
- name: Install dependencies
run: flutter pub get

- name: Analyze
- name: Analyze code
run: flutter analyze .

- name: Run tests
run: flutter test

- name: Setup Pub Credentials
run: |
echo "export PUB_DEV_PUBLISH_ACCESS_TOKEN=$PUB_DEV_PUBLISH_ACCESS_TOKEN" >> $GITHUB_ENV
echo "export PUB_DEV_PUBLISH_REFRESH_TOKEN=$PUB_DEV_PUBLISH_REFRESH_TOKEN" >> $GITHUB_ENV (optional, if using refresh token)
echo "PUB_DEV_PUBLISH_ACCESS_TOKEN=${{ secrets.PUB_DEV_PUBLISH_ACCESS_TOKEN }}" >> $GITHUB_ENV
echo "PUB_DEV_PUBLISH_REFRESH_TOKEN=${{ secrets.PUB_DEV_PUBLISH_REFRESH_TOKEN }}" >> $GITHUB_ENV
- name: Check Publish Warnings
run: dart pub publish --dry-run
Expand Down

0 comments on commit c4a1cd7

Please sign in to comment.