Skip to content

Commit 327b6e0

Browse files
authored
ci: add manual release workflow (#754)
1 parent aa43b4a commit 327b6e0

File tree

2 files changed

+77
-32
lines changed

2 files changed

+77
-32
lines changed

.github/workflows/release-manual.yml

Lines changed: 20 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -1,44 +1,31 @@
1+
# Trigger this workflow to manually create a release of the flutter package.
2+
13
name: release-manual
24
on:
3-
release:
4-
types:
5-
- published
5+
workflow_dispatch:
6+
inputs:
7+
ref:
8+
description: 'Reference (tag / SHA):'
9+
required: true
10+
default: ''
11+
package:
12+
description: 'Package'
13+
required: true
14+
default: ''
15+
type: choice
16+
options:
17+
- dart
18+
- flutter
619
jobs:
7-
# dry-run:
8-
# runs-on: ubuntu-latest
9-
# outputs:
10-
# dart_dry_run_success: ${{ steps.try-dart.outputs.success }}
11-
# flutter_dry_run_success: ${{ steps.try-flutter.outputs.success }}
12-
# steps:
13-
# - name: Checkout code
14-
# uses: actions/checkout@v3
15-
# - name: Dry run dart package
16-
# uses: k-paxian/[email protected]
17-
# id: try-dart
18-
# with:
19-
# accessToken: ${{ secrets.PUBDEV_GOOGLE_ACCOUNT_ACCESS_TOKEN }}
20-
# refreshToken: ${{ secrets.PUBDEV_GOOGLE_ACCOUNT_REFRESH_TOKEN }}
21-
# relativePath: packages/dart
22-
# format: true
23-
# dryRunOnly: true
24-
# - name: Dry run flutter package
25-
# uses: k-paxian/[email protected]
26-
# id: try-flutter
27-
# with:
28-
# accessToken: ${{ secrets.PUBDEV_GOOGLE_ACCOUNT_ACCESS_TOKEN }}
29-
# refreshToken: ${{ secrets.PUBDEV_GOOGLE_ACCOUNT_REFRESH_TOKEN }}
30-
# relativePath: packages/flutter
31-
# flutter: true
32-
# format: true
33-
# dryRunOnly: true
3420
release:
3521
runs-on: ubuntu-latest
36-
# needs: dry-run
37-
# if: needs.dry-run.outputs.dart_dry_run_success && needs.dry-run.outputs.flutter_dry_run_success
3822
steps:
3923
- name: Checkout code
4024
uses: actions/checkout@v3
25+
with:
26+
ref: ${{ github.event.inputs.ref }}
4127
- name: Publish dart package
28+
if: github.event.inputs.package == 'dart'
4229
uses: k-paxian/[email protected]
4330
with:
4431
accessToken: ${{ secrets.PUBDEV_GOOGLE_ACCOUNT_ACCESS_TOKEN }}
@@ -47,6 +34,7 @@ jobs:
4734
format: true
4835
dryRunOnly: true
4936
- name: Publish flutter package
37+
if: github.event.inputs.package == 'flutter'
5038
uses: k-paxian/[email protected]
5139
with:
5240
accessToken: ${{ secrets.PUBDEV_GOOGLE_ACCOUNT_ACCESS_TOKEN }}
Lines changed: 57 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,57 @@
1+
name: release-trigger
2+
on:
3+
release:
4+
types:
5+
- published
6+
jobs:
7+
# dry-run:
8+
# runs-on: ubuntu-latest
9+
# outputs:
10+
# dart_dry_run_success: ${{ steps.try-dart.outputs.success }}
11+
# flutter_dry_run_success: ${{ steps.try-flutter.outputs.success }}
12+
# steps:
13+
# - name: Checkout code
14+
# uses: actions/checkout@v3
15+
# - name: Dry run dart package
16+
# uses: k-paxian/[email protected]
17+
# id: try-dart
18+
# with:
19+
# accessToken: ${{ secrets.PUBDEV_GOOGLE_ACCOUNT_ACCESS_TOKEN }}
20+
# refreshToken: ${{ secrets.PUBDEV_GOOGLE_ACCOUNT_REFRESH_TOKEN }}
21+
# relativePath: packages/dart
22+
# format: true
23+
# dryRunOnly: true
24+
# - name: Dry run flutter package
25+
# uses: k-paxian/[email protected]
26+
# id: try-flutter
27+
# with:
28+
# accessToken: ${{ secrets.PUBDEV_GOOGLE_ACCOUNT_ACCESS_TOKEN }}
29+
# refreshToken: ${{ secrets.PUBDEV_GOOGLE_ACCOUNT_REFRESH_TOKEN }}
30+
# relativePath: packages/flutter
31+
# flutter: true
32+
# format: true
33+
# dryRunOnly: true
34+
release:
35+
runs-on: ubuntu-latest
36+
# needs: dry-run
37+
# if: needs.dry-run.outputs.dart_dry_run_success && needs.dry-run.outputs.flutter_dry_run_success
38+
steps:
39+
- name: Checkout code
40+
uses: actions/checkout@v3
41+
- name: Publish dart package
42+
uses: k-paxian/[email protected]
43+
with:
44+
accessToken: ${{ secrets.PUBDEV_GOOGLE_ACCOUNT_ACCESS_TOKEN }}
45+
refreshToken: ${{ secrets.PUBDEV_GOOGLE_ACCOUNT_REFRESH_TOKEN }}
46+
relativePath: packages/dart
47+
format: true
48+
dryRunOnly: true
49+
- name: Publish flutter package
50+
uses: k-paxian/[email protected]
51+
with:
52+
accessToken: ${{ secrets.PUBDEV_GOOGLE_ACCOUNT_ACCESS_TOKEN }}
53+
refreshToken: ${{ secrets.PUBDEV_GOOGLE_ACCOUNT_REFRESH_TOKEN }}
54+
relativePath: packages/flutter
55+
flutter: true
56+
format: true
57+
dryRunOnly: true

0 commit comments

Comments
 (0)