Skip to content

Commit

Permalink
ci: add versions.env to unify flutter and dart versions
Browse files Browse the repository at this point in the history
  • Loading branch information
coder-with-a-bushido committed Feb 23, 2024
1 parent b478342 commit 681efd7
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 7 deletions.
9 changes: 3 additions & 6 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,10 +13,6 @@ concurrency:
group: ${{ github.ref }}
cancel-in-progress: true

env:
FLUTTER_VERSION: 3.10.6
DART_VERSION: 3.0.6

jobs:
# because there is no easy way to pass env variables to jobs
versions:
Expand All @@ -25,10 +21,11 @@ jobs:
flutter_version: ${{ steps.flutterver.outputs.FLUTTER_VERSION }}
dart_version: ${{ steps.dartver.outputs.DART_VERSION }}
steps:
- run: cat .github/workflows/versions.env >> $GITHUB_ENV
- id: flutterver
run: echo "FLUTTER_VERSION=${{ env.FLUTTER_VERSION }}" >> "$GITHUB_OUTPUT"
run: echo "FLUTTER_VERSION=${{ env.flutter_version }}" >> "$GITHUB_OUTPUT"
- id: dartver
run: echo "DART_VERSION=${{ env.DART_VERSION }}" >> "$GITHUB_OUTPUT"
run: echo "DART_VERSION=${{ env.dart_version }}" >> "$GITHUB_OUTPUT"

dart:
permissions:
Expand Down
7 changes: 6 additions & 1 deletion .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,12 @@ on:
# Publish using the reusable workflow from dart-lang.
jobs:
publish:
runs-on: ubuntu-latest
permissions:
contents: read
id-token: write
uses: famedly/frontend-ci-templates/.github/workflows/publish-pub.yml@main
steps:
- run: cat .github/workflows/versions.env >> $GITHUB_ENV
- uses: famedly/frontend-ci-templates/.github/workflows/publish-pub.yml@a827d11d9903ba94ee27240cc77533c530e0fb05
with:
dart_version: ${{ env.dart_version }}
2 changes: 2 additions & 0 deletions .github/workflows/versions.env
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
flutter_version=3.10.6
dart_version=3.0.6

0 comments on commit 681efd7

Please sign in to comment.