Skip to content

chore: bump actions/checkout from 4 to 6 #211

chore: bump actions/checkout from 4 to 6

chore: bump actions/checkout from 4 to 6 #211

name: Dart Pub Publish Workflow

Check failure on line 1 in .github/workflows/flutter_pub_publish.yml

View workflow run for this annotation

GitHub Actions / .github/workflows/flutter_pub_publish.yml

Invalid workflow file

(Line: 56, Col: 13): Unrecognized named-value: 'secrets'. Located at position 1 within expression: secrets.pub_credentials != '', (Line: 62, Col: 13): Unrecognized named-value: 'secrets'. Located at position 1 within expression: secrets.pub_credentials == ''
on:
workflow_call:
inputs:
flutter_channel:
required: false
type: string
default: "stable"
flutter_version:
required: false
type: string
default: ""
working_directory:
required: false
type: string
default: "."
runs_on:
required: false
type: string
default: "ubuntu-latest"
timeout_minutes:
required: false
type: number
default: 5
# Deprecated, will be used if passed in but using the "Setup Dart" action is recommended
secrets:
pub_credentials:
required: true
jobs:
publish:
defaults:
run:
working-directory: ${{inputs.working_directory}}
runs-on: ${{inputs.runs_on}}
timeout-minutes: ${{inputs.timeout_minutes}}
steps:
- name: 📚 Git Checkout
uses: actions/checkout@v6
- name: 🐦 Setup Flutter
uses: subosito/flutter-action@v2
with:
flutter-version: ${{inputs.flutter_version}}
channel: ${{inputs.flutter_channel}}
cache: true
- name: 📦 Install Dependencies
run: flutter pub get
- name: 🔐 Setup Pub Credentials\
if: ${{ secrets.pub_credentials != '' }}
run: |
mkdir -p $XDG_CONFIG_HOME/dart
echo '${{secrets.pub_credentials}}' > "$XDG_CONFIG_HOME/dart/pub-credentials.json"
- name: 🎯 Setup Dart
if: ${{ secrets.pub_credentials == '' }}
uses: dart-lang/setup-dart@v1
with:
sdk: ${{inputs.dart_sdk}}
- name: 🌵 Dry Run
run: flutter pub publish --dry-run
- name: 📢 Publish
run: flutter pub publish -f