Skip to content

Commit

Permalink
ci: add manual release workflow (#754)
Browse files Browse the repository at this point in the history
  • Loading branch information
mtrezza authored May 29, 2022
1 parent aa43b4a commit 327b6e0
Show file tree
Hide file tree
Showing 2 changed files with 77 additions and 32 deletions.
52 changes: 20 additions & 32 deletions .github/workflows/release-manual.yml
Original file line number Diff line number Diff line change
@@ -1,44 +1,31 @@
# Trigger this workflow to manually create a release of the flutter package.

name: release-manual
on:
release:
types:
- published
workflow_dispatch:
inputs:
ref:
description: 'Reference (tag / SHA):'
required: true
default: ''
package:
description: 'Package'
required: true
default: ''
type: choice
options:
- dart
- flutter
jobs:
# dry-run:
# runs-on: ubuntu-latest
# outputs:
# dart_dry_run_success: ${{ steps.try-dart.outputs.success }}
# flutter_dry_run_success: ${{ steps.try-flutter.outputs.success }}
# steps:
# - name: Checkout code
# uses: actions/checkout@v3
# - name: Dry run dart package
# uses: k-paxian/[email protected]
# id: try-dart
# with:
# accessToken: ${{ secrets.PUBDEV_GOOGLE_ACCOUNT_ACCESS_TOKEN }}
# refreshToken: ${{ secrets.PUBDEV_GOOGLE_ACCOUNT_REFRESH_TOKEN }}
# relativePath: packages/dart
# format: true
# dryRunOnly: true
# - name: Dry run flutter package
# uses: k-paxian/[email protected]
# id: try-flutter
# with:
# accessToken: ${{ secrets.PUBDEV_GOOGLE_ACCOUNT_ACCESS_TOKEN }}
# refreshToken: ${{ secrets.PUBDEV_GOOGLE_ACCOUNT_REFRESH_TOKEN }}
# relativePath: packages/flutter
# flutter: true
# format: true
# dryRunOnly: true
release:
runs-on: ubuntu-latest
# needs: dry-run
# if: needs.dry-run.outputs.dart_dry_run_success && needs.dry-run.outputs.flutter_dry_run_success
steps:
- name: Checkout code
uses: actions/checkout@v3
with:
ref: ${{ github.event.inputs.ref }}
- name: Publish dart package
if: github.event.inputs.package == 'dart'
uses: k-paxian/[email protected]
with:
accessToken: ${{ secrets.PUBDEV_GOOGLE_ACCOUNT_ACCESS_TOKEN }}
Expand All @@ -47,6 +34,7 @@ jobs:
format: true
dryRunOnly: true
- name: Publish flutter package
if: github.event.inputs.package == 'flutter'
uses: k-paxian/[email protected]
with:
accessToken: ${{ secrets.PUBDEV_GOOGLE_ACCOUNT_ACCESS_TOKEN }}
Expand Down
57 changes: 57 additions & 0 deletions .github/workflows/release-trigger.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@
name: release-trigger
on:
release:
types:
- published
jobs:
# dry-run:
# runs-on: ubuntu-latest
# outputs:
# dart_dry_run_success: ${{ steps.try-dart.outputs.success }}
# flutter_dry_run_success: ${{ steps.try-flutter.outputs.success }}
# steps:
# - name: Checkout code
# uses: actions/checkout@v3
# - name: Dry run dart package
# uses: k-paxian/[email protected]
# id: try-dart
# with:
# accessToken: ${{ secrets.PUBDEV_GOOGLE_ACCOUNT_ACCESS_TOKEN }}
# refreshToken: ${{ secrets.PUBDEV_GOOGLE_ACCOUNT_REFRESH_TOKEN }}
# relativePath: packages/dart
# format: true
# dryRunOnly: true
# - name: Dry run flutter package
# uses: k-paxian/[email protected]
# id: try-flutter
# with:
# accessToken: ${{ secrets.PUBDEV_GOOGLE_ACCOUNT_ACCESS_TOKEN }}
# refreshToken: ${{ secrets.PUBDEV_GOOGLE_ACCOUNT_REFRESH_TOKEN }}
# relativePath: packages/flutter
# flutter: true
# format: true
# dryRunOnly: true
release:
runs-on: ubuntu-latest
# needs: dry-run
# if: needs.dry-run.outputs.dart_dry_run_success && needs.dry-run.outputs.flutter_dry_run_success
steps:
- name: Checkout code
uses: actions/checkout@v3
- name: Publish dart package
uses: k-paxian/[email protected]
with:
accessToken: ${{ secrets.PUBDEV_GOOGLE_ACCOUNT_ACCESS_TOKEN }}
refreshToken: ${{ secrets.PUBDEV_GOOGLE_ACCOUNT_REFRESH_TOKEN }}
relativePath: packages/dart
format: true
dryRunOnly: true
- name: Publish flutter package
uses: k-paxian/[email protected]
with:
accessToken: ${{ secrets.PUBDEV_GOOGLE_ACCOUNT_ACCESS_TOKEN }}
refreshToken: ${{ secrets.PUBDEV_GOOGLE_ACCOUNT_REFRESH_TOKEN }}
relativePath: packages/flutter
flutter: true
format: true
dryRunOnly: true

0 comments on commit 327b6e0

Please sign in to comment.