Skip to content

Commit

Permalink
ci: replace deployment job for reuse workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
deandreamatias committed Aug 11, 2024
1 parent 2a6982f commit 6a92730
Showing 1 changed file with 14 additions and 15 deletions.
29 changes: 14 additions & 15 deletions .github/workflows/base.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,8 @@ jobs:

steps:
- uses: actions/checkout@v4
with:
fetch-depth: 1 # Use shallow clone for faster checkout

- name: Check broken links
uses: JustinBeckwith/linkinator-action@v1
Expand All @@ -34,10 +36,18 @@ jobs:
distribution: 'zulu'
java-version: '11'

- name: Get Flutter version by FVM
uses: kuhnroyal/flutter-fvm-config-action@v2
id: fvm-config-action
with:
path: ".fvmrc"

- name: Flutter action
uses: subosito/flutter-action@v2
with:
channel: 'stable'
flutter-version: ${{ steps.fvm-config-action.outputs.FLUTTER_VERSION }}
channel: ${{ steps.fvm-config-action.outputs.FLUTTER_CHANNEL }}
architecture: x64
cache: true

- name: Install dependencies
Expand Down Expand Up @@ -65,19 +75,8 @@ jobs:
flutter build web
deployment:
if: ${{ github.ref_type == 'tag' }}
needs: build
name: Deploy package
permissions:
id-token: write
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: dart-lang/setup-dart@v1
- name: Flutter action
uses: subosito/flutter-action@v2
with:
channel: 'stable'
cache: true
- name: Publish package
run: dart pub publish -v -f
uses: flutter-form-builder-ecosystem/.github/.github/workflows/deployment.yaml@main
if: ${{ github.ref_type == 'tag' }}
needs: build

0 comments on commit 6a92730

Please sign in to comment.