Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ci: update dry run string #180

Merged
merged 4 commits into from
Mar 14, 2024
Merged
Show file tree
Hide file tree
Changes from 3 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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]+*'
justin-fiedler marked this conversation as resolved.
Show resolved Hide resolved
workflow_dispatch:
inputs:
dryRun:
description: 'Do a dry run to preview instead of a real publish'
type: choice
required: true
default: 'dry-run'
options:
- 'dry-run'
- 'publish'

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 == 'dry-run' }}
run: flutter pub publish --dry-run

- name: Publish to pub.dev
if: ${{ github.event.inputs.dryRun == 'publish' }}
run: flutter pub publish --force
10 changes: 5 additions & 5 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,10 @@ on:
description: 'Do a dry run to preview instead of a real release'
type: choice
required: true
default: 'true'
default: 'dry-run'
options:
- 'true'
- 'false'
- 'dry-run'
- 'release'

jobs:
authorize:
Expand Down Expand Up @@ -53,7 +53,7 @@ jobs:
run: flutter test

- name: Semantic Release --dry-run
if: ${{ github.event.inputs.dryRun == 'true'}}
if: ${{ github.event.inputs.dryRun == 'dry-run'}}
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
GIT_AUTHOR_NAME: amplitude-sdk-bot
Expand All @@ -71,7 +71,7 @@ jobs:
semantic-release --dry-run

- name: Semantic Release
if: ${{ github.event.inputs.dryRun == 'false'}}
if: ${{ github.event.inputs.dryRun == 'release'}}
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
GIT_AUTHOR_NAME: amplitude-sdk-bot
Expand Down
Loading