Skip to content

Commit

Permalink
Update publish.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
Mercy811 committed Mar 12, 2024
1 parent cf17c66 commit 4b5ac15
Showing 1 changed file with 15 additions and 3 deletions.
18 changes: 15 additions & 3 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
@@ -1,9 +1,16 @@
name: Publish to pub.dev

on:
push:
tags:
- 'v[0-9]+.[0-9]+.[0-9]+*'
workflow_dispatch:
inputs:
dryRun:
description: 'Do a dry run to preview instead of a real publish'
type: choice
required: true
default: 'true'
options:
- 'true'
- 'false'

jobs:
publish:
Expand Down Expand Up @@ -34,5 +41,10 @@ jobs:
- name: Check Flutter version
run: flutter --version

- name: Publish to pub.dev --dry-run
if: ${{ github.event.inputs.dryRun == 'false' }}
run: flutter pub publish --dry-run

- name: Publish to pub.dev
if: ${{ github.event.inputs.dryRun == 'false' }}
run: flutter pub publish --force

0 comments on commit 4b5ac15

Please sign in to comment.