Skip to content

Publish to pub.dev

Publish to pub.dev #8

Workflow file for this run

name: Publish to pub.dev
on: workflow_dispatch
# release:
# types: [published]
jobs:
publish:
name: Publish to pub.dev
permissions:
id-token: write
runs-on: macos-latest
steps:
# Checkout the repo
- uses: actions/checkout@v3
# Install Flutter
- name: Install and set Flutter version
uses: subosito/flutter-action@v2
with:
flutter-version: '3.16.0'
channel: 'stable'
# Setup Dart SDK
- uses: dart-lang/setup-dart@v1
# Generates package files
- name: Generate files
shell: bash
run: flutter pub get
- shell: bash
run: flutter pub run build_runner build --delete-conflicting-outputs
# Generates example app files
- shell: bash
run: cd example
- shell: bash
run: flutter pub get
- shell: bash
run: flutter pub run build_runner build --delete-conflicting-outputs
- shell: bash
run: cd ..
# Publish
- name: Check Publish Warnings
shell: bash
run: flutter pub publish --dry-run
# - name: Publish Package
# shell: bash
# run: flutter pub publish -f
- name: Delivering IPA
shell: bash
env:
PROJECT_ID: ${{ secrets.PROJECT_ID }}
run: echo $PROJECT_ID