From 473ba9049676857109c8e3268d9b2e6f3c197b2f Mon Sep 17 00:00:00 2001 From: Xinyi Ye Date: Tue, 12 Mar 2024 16:02:31 -0700 Subject: [PATCH 1/4] Update publish.yml --- .github/workflows/publish.yml | 18 +++++++++++++++--- 1 file changed, 15 insertions(+), 3 deletions(-) diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index f5a331f..699e737 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -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: @@ -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 From 939544cadc025819c245652a0c776e78070f8b57 Mon Sep 17 00:00:00 2001 From: Xinyi Ye Date: Tue, 12 Mar 2024 16:04:13 -0700 Subject: [PATCH 2/4] Update publish.yml --- .github/workflows/publish.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index 699e737..e0960be 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -42,7 +42,7 @@ jobs: run: flutter --version - name: Publish to pub.dev --dry-run - if: ${{ github.event.inputs.dryRun == 'false' }} + if: ${{ github.event.inputs.dryRun == 'true' }} run: flutter pub publish --dry-run - name: Publish to pub.dev From 51ea0446300c00495992d8f6e6c0b8b85a2f6f6b Mon Sep 17 00:00:00 2001 From: Xinyi Ye Date: Tue, 12 Mar 2024 16:18:46 -0700 Subject: [PATCH 3/4] ci: update dry run --- .github/workflows/publish.yml | 10 +++++----- .github/workflows/release.yml | 10 +++++----- 2 files changed, 10 insertions(+), 10 deletions(-) diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index e0960be..922b7ac 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -7,10 +7,10 @@ on: description: 'Do a dry run to preview instead of a real publish' type: choice required: true - default: 'true' + default: 'dry-run' options: - - 'true' - - 'false' + - 'dry-run' + - 'publish' jobs: publish: @@ -42,9 +42,9 @@ jobs: run: flutter --version - name: Publish to pub.dev --dry-run - if: ${{ github.event.inputs.dryRun == 'true' }} + if: ${{ github.event.inputs.dryRun == 'dry-run' }} run: flutter pub publish --dry-run - name: Publish to pub.dev - if: ${{ github.event.inputs.dryRun == 'false' }} + if: ${{ github.event.inputs.dryRun == 'publish' }} run: flutter pub publish --force diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 72c9dfb..7df748a 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -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: @@ -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 @@ -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 From 7e56d8b5a9df51032d61711c2ba9905c9239f65f Mon Sep 17 00:00:00 2001 From: Xinyi Ye Date: Wed, 13 Mar 2024 10:28:10 -0700 Subject: [PATCH 4/4] Update publish.yml --- .github/workflows/publish.yml | 18 +++--------------- 1 file changed, 3 insertions(+), 15 deletions(-) diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index 922b7ac..f5a331f 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -1,16 +1,9 @@ name: Publish to pub.dev on: - 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' + push: + tags: + - 'v[0-9]+.[0-9]+.[0-9]+*' jobs: publish: @@ -41,10 +34,5 @@ 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