Skip to content

Commit 9db45fe

Browse files
committed
Merge remote-tracking branch 'upstream/master'
2 parents c831125 + e7f8de2 commit 9db45fe

File tree

11 files changed

+6808
-1
lines changed

11 files changed

+6808
-1
lines changed

.github/workflows/ci.yml

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -147,6 +147,31 @@ jobs:
147147
files: packages/flutter/coverage/lcov-full.info
148148
fail_ci_if_error: true
149149
token: ${{ secrets.CODECOV_TOKEN }}
150+
auto-release-dry-run:
151+
runs-on: ubuntu-latest
152+
timeout-minutes: 10
153+
name: Auto-Release Dry Run
154+
steps:
155+
- name: Checkout code
156+
uses: actions/checkout@v4
157+
with:
158+
fetch-depth: 0 # Required for semantic-release to analyze commit history
159+
- name: Setup Node.js
160+
uses: actions/setup-node@v4
161+
with:
162+
node-version: '18'
163+
- name: Install dependencies
164+
run: npm ci
165+
- name: Dry run semantic-release for dart package
166+
env:
167+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
168+
PKG_NAME: dart
169+
run: npx semantic-release --dry-run
170+
- name: Dry run semantic-release for flutter package
171+
env:
172+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
173+
PKG_NAME: flutter
174+
run: npx semantic-release --dry-run
150175
concurrency:
151176
group: ${{ github.workflow }}-${{ github.ref }}
152177
cancel-in-progress: true

.github/workflows/release-automated.yml

Lines changed: 38 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,13 +7,50 @@
77
name: release-automated
88
on:
99
push:
10+
branches:
11+
- master
12+
- next-major
1013
tags:
1114
- "dart-[0-9]+.[0-9]+.[0-9]+*"
1215
- "flutter-[0-9]+.[0-9]+.[0-9]+*"
1316
env:
14-
package: ${{ startsWith(github.ref_name, 'dart') && 'dart' || 'flutter' }}
17+
package: ${{ startsWith(github.ref_name, 'dart-') && 'dart' || startsWith(github.ref_name, 'flutter-') && 'flutter' || '' }}
1518
jobs:
19+
# Semantic Release job - runs on branch pushes to create tags and update changelogs
20+
semantic-release:
21+
if: github.event_name == 'push' && github.ref_type == 'branch'
22+
runs-on: ubuntu-latest
23+
timeout-minutes: 10
24+
permissions:
25+
contents: write # Required for creating tags and commits
26+
issues: write # Required for commenting on issues
27+
pull-requests: write # Required for commenting on PRs
28+
steps:
29+
- name: Checkout code
30+
uses: actions/checkout@v3
31+
with:
32+
fetch-depth: 0 # Required for semantic-release
33+
persist-credentials: true
34+
- name: Setup Node.js
35+
uses: actions/setup-node@v3
36+
with:
37+
node-version: '18'
38+
- name: Install dependencies
39+
run: npm ci
40+
- name: Run semantic-release for dart package
41+
env:
42+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
43+
PKG_NAME: dart
44+
run: npx semantic-release
45+
- name: Run semantic-release for flutter package
46+
env:
47+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
48+
PKG_NAME: flutter
49+
run: npx semantic-release
50+
51+
# Publishing job - runs when a tag is pushed (created by semantic-release)
1652
release:
53+
if: github.event_name == 'push' && github.ref_type == 'tag'
1754
runs-on: ubuntu-latest
1855
timeout-minutes: 10
1956
permissions:

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -122,3 +122,4 @@ app.*.symbols
122122
!/packages/flutter_tools/test/data/dart_dependencies_test/**/.packages
123123
!/dev/ci/**/Gemfile.lock
124124

125+
/node_modules

.releaserc/commit.hbs

Lines changed: 61 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,61 @@
1+
*{{#if scope}} **{{scope}}:**
2+
{{~/if}} {{#if subject}}
3+
{{~subject}}
4+
{{~else}}
5+
{{~header}}
6+
{{~/if}}
7+
8+
{{~!-- commit link --}} {{#if @root.linkReferences~}}
9+
([{{shortHash}}](
10+
{{~#if @root.repository}}
11+
{{~#if @root.host}}
12+
{{~@root.host}}/
13+
{{~/if}}
14+
{{~#if @root.owner}}
15+
{{~@root.owner}}/
16+
{{~/if}}
17+
{{~@root.repository}}
18+
{{~else}}
19+
{{~@root.repoUrl}}
20+
{{~/if}}/
21+
{{~@root.commit}}/{{hash}}))
22+
{{~else}}
23+
{{~shortHash}}
24+
{{~/if}}
25+
26+
{{~!-- commit references --}}
27+
{{~#if references~}}
28+
, closes
29+
{{~#each references}} {{#if @root.linkReferences~}}
30+
[
31+
{{~#if this.owner}}
32+
{{~this.owner}}/
33+
{{~/if}}
34+
{{~this.repository}}#{{this.issue}}](
35+
{{~#if @root.repository}}
36+
{{~#if @root.host}}
37+
{{~@root.host}}/
38+
{{~/if}}
39+
{{~#if this.repository}}
40+
{{~#if this.owner}}
41+
{{~this.owner}}/
42+
{{~/if}}
43+
{{~this.repository}}
44+
{{~else}}
45+
{{~#if @root.owner}}
46+
{{~@root.owner}}/
47+
{{~/if}}
48+
{{~@root.repository}}
49+
{{~/if}}
50+
{{~else}}
51+
{{~@root.repoUrl}}
52+
{{~/if}}/
53+
{{~@root.issue}}/{{this.issue}})
54+
{{~else}}
55+
{{~#if this.owner}}
56+
{{~this.owner}}/
57+
{{~/if}}
58+
{{~this.repository}}#{{this.issue}}
59+
{{~/if}}{{/each}}
60+
{{~/if}}
61+

.releaserc/footer.hbs

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
{{#if noteGroups}}
2+
{{#each noteGroups}}
3+
4+
### {{title}}
5+
6+
{{#each notes}}
7+
* {{#if commit.scope}}**{{commit.scope}}:** {{/if}}{{text}} ([{{commit.shortHash}}]({{commit.shortHash}}))
8+
{{/each}}
9+
{{/each}}
10+
11+
{{/if}}

.releaserc/header.hbs

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
{{#if isPatch~}}
2+
##
3+
{{~else~}}
4+
#
5+
{{~/if}} {{#if @root.linkCompare~}}
6+
[{{version}}](
7+
{{~#if @root.repository~}}
8+
{{~#if @root.host}}
9+
{{~@root.host}}/
10+
{{~/if}}
11+
{{~#if @root.owner}}
12+
{{~@root.owner}}/
13+
{{~/if}}
14+
{{~@root.repository}}
15+
{{~else}}
16+
{{~@root.repoUrl}}
17+
{{~/if~}}
18+
/compare/{{previousTag}}...{{currentTag}})
19+
{{~else}}
20+
{{~version}}
21+
{{~/if}}
22+
{{~#if title}} "{{title}}"
23+
{{~/if}}
24+
{{~#if date}} ({{date}})
25+
{{/if}}

.releaserc/template.hbs

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
{{> header}}
2+
3+
{{#each commitGroups}}
4+
5+
{{#if title}}
6+
### {{title}}
7+
8+
{{/if}}
9+
{{#each commits}}
10+
{{> commit root=@root}}
11+
{{/each}}
12+
{{/each}}
13+
14+
{{> footer}}

0 commit comments

Comments
 (0)