File tree 14 files changed +196
-125
lines changed
14 files changed +196
-125
lines changed Original file line number Diff line number Diff line change @@ -475,8 +475,13 @@ public function getFiles(): array
475
475
],
476
476
[
477
477
'scope ' => 'default ' ,
478
- 'destination ' => '.travis.yml ' ,
479
- 'template ' => 'dart/.travis.yml.twig ' ,
478
+ 'destination ' => '.github/workflows/publish.yml ' ,
479
+ 'template ' => 'dart/.github/workflows/publish.yml.twig ' ,
480
+ ],
481
+ [
482
+ 'scope ' => 'default ' ,
483
+ 'destination ' => '.github/workflows/format.yml ' ,
484
+ 'template ' => 'dart/.github/workflows/format.yml.twig ' ,
480
485
],
481
486
[
482
487
'scope ' => 'default ' ,
Original file line number Diff line number Diff line change @@ -332,8 +332,13 @@ public function getFiles(): array
332
332
],
333
333
[
334
334
'scope ' => 'default ' ,
335
- 'destination ' => '.travis.yml ' ,
336
- 'template ' => 'flutter/.travis.yml.twig ' ,
335
+ 'destination ' => '.github/workflows/publish.yml ' ,
336
+ 'template ' => 'flutter/.github/workflows/publish.yml.twig ' ,
337
+ ],
338
+ [
339
+ 'scope ' => 'default ' ,
340
+ 'destination ' => '.github/workflows/format.yml ' ,
341
+ 'template ' => 'flutter/.github/workflows/format.yml.twig ' ,
337
342
],
338
343
[
339
344
'scope ' => 'enum ' ,
Original file line number Diff line number Diff line change @@ -234,8 +234,8 @@ public function getFiles(): array
234
234
],
235
235
[
236
236
'scope ' => 'default ' ,
237
- 'destination ' => '.travis .yml ' ,
238
- 'template ' => 'node/.travis .yml.twig ' ,
237
+ 'destination ' => '.github/workflows/publish .yml ' ,
238
+ 'template ' => 'node/.github/workflows/publish .yml.twig ' ,
239
239
],
240
240
[
241
241
'scope ' => 'enum ' ,
Original file line number Diff line number Diff line change @@ -112,8 +112,8 @@ public function getFiles(): array
112
112
],
113
113
[
114
114
'scope ' => 'default ' ,
115
- 'destination ' => '.travis .yml ' ,
116
- 'template ' => 'web/.travis .yml.twig ' ,
115
+ 'destination ' => '.github/workflows/publish .yml ' ,
116
+ 'template ' => 'web/.github/workflows/publish .yml.twig ' ,
117
117
],
118
118
[
119
119
'scope ' => 'enum ' ,
Original file line number Diff line number Diff line change
1
+ name: Format and push
2
+
3
+ # Github action will require permission to write to repo
4
+ on:
5
+ pull_request:
6
+ branches:
7
+ - main
8
+ workflow_dispatch:
9
+
10
+ jobs:
11
+ format:
12
+ runs-on: ubuntu-latest
13
+ container:
14
+ image: dart:stable
15
+
16
+ steps:
17
+ - name: Checkout repository
18
+ uses: actions/checkout@v4
19
+ with:
20
+ persist-credentials: true
21
+ ref: ${{ ' {{' }} github.event.pull_request.head.ref {{ ' }}' }}
22
+
23
+ - name: Format Dart code
24
+ run: dart format .
25
+
26
+ - name: git config
27
+ run: git config --global --add safe.directory /__w/sdk-for-dart/sdk-for-dart # required to fix dubious ownership
28
+
29
+ - name: Add & Commit
30
+ uses: EndBug/add-and-commit@v9.1.4
31
+ with:
32
+ add: lib
33
+
Original file line number Diff line number Diff line change
1
+ name: Publish to pub.dev
2
+
3
+ on:
4
+ push:
5
+ tags:
6
+ - '[0-9]+\.[0-9]+\.[0-9]+.*'
7
+
8
+ jobs:
9
+ publish:
10
+ permissions:
11
+ id-token: write
12
+ uses: dart-lang/setup-dart/.github/workflows/publish.yml@v1
13
+ with:
14
+ environment: pub.dev
Load Diff This file was deleted.
Original file line number Diff line number Diff line change
1
+ name: Format and push
2
+
3
+ # Github action will require permission to write to repo
4
+ on:
5
+ pull_request:
6
+ branches:
7
+ - main
8
+ workflow_dispatch:
9
+
10
+ jobs:
11
+ format:
12
+ runs-on: ubuntu-latest
13
+ container:
14
+ image: dart:stable
15
+
16
+ steps:
17
+ - name: Checkout repository
18
+ uses: actions/checkout@v4
19
+ with:
20
+ persist-credentials: true
21
+ ref: ${{ ' {{' }} github.event.pull_request.head.ref {{ ' }}' }}
22
+
23
+ - name: Format Dart code
24
+ run: dart format .
25
+
26
+ - name: git config
27
+ run: git config --global --add safe.directory /__w/sdk-for-flutter/sdk-for-flutter # required to fix dubious ownership
28
+
29
+ - name: Add & Commit
30
+ uses: EndBug/add-and-commit@v9.1.4
31
+ with:
32
+ add: lib
33
+
Original file line number Diff line number Diff line change
1
+ name: Publish to pub.dev
2
+
3
+ on:
4
+ push:
5
+ tags:
6
+ - '[0-9]+\.[0-9]+\.[0-9]+.*'
7
+
8
+ jobs:
9
+ publish:
10
+ permissions:
11
+ id-token: write
12
+ uses: dart-lang/setup-dart/.github/workflows/publish.yml@v1
13
+ with:
14
+ environment: pub.dev
Load Diff This file was deleted.
Original file line number Diff line number Diff line change
1
+ name: Publish to NPM
2
+
3
+ on:
4
+ release:
5
+ types: [published]
6
+ workflow_dispatch:
7
+
8
+ jobs:
9
+ publish:
10
+ runs-on: ubuntu-latest
11
+
12
+ steps:
13
+ - uses: actions/checkout@v4
14
+
15
+ # Setup Node.js environment
16
+ - name: Use Node.js
17
+ uses: actions/setup-node@v4
18
+ with:
19
+ node-version: '20.x'
20
+ registry-url: 'https://registry.npmjs.org'
21
+
22
+ # Determine release tag based on the tag name
23
+ - name: Determine release tag
24
+ id: release_tag
25
+ run: |
26
+ if [[ "${{ ' {{' }} github.ref {{ ' }}' }}" == *"-rc"* ]] || [[ "${{ ' {{' }} github.ref {{ ' }}' }}" == *"-RC"* ]]; then
27
+ echo "tag=next" >> "$GITHUB_OUTPUT"
28
+ else
29
+ echo "tag=latest" >> "$GITHUB_OUTPUT"
30
+ fi
31
+
32
+ # Install dependencies (if any) and build your project (if necessary)
33
+ - name: Install dependencies and build
34
+ run: |
35
+ npm install
36
+ npm run build
37
+
38
+ # Publish to NPM with the appropriate tag
39
+ - name: Publish
40
+ run: npm publish --tag ${{ ' {{' }} steps.release_tag.outputs.tag {{ ' }}' }}
41
+ env:
42
+ NODE_AUTH_TOKEN: ${{ ' {{' }} secrets.NPM_TOKEN {{ ' }}' }}
Load Diff This file was deleted.
Original file line number Diff line number Diff line change
1
+ name: Publish to NPM
2
+
3
+ on:
4
+ release:
5
+ types: [published]
6
+ workflow_dispatch:
7
+
8
+ jobs:
9
+ publish:
10
+ runs-on: ubuntu-latest
11
+
12
+ steps:
13
+ - uses: actions/checkout@v4
14
+
15
+ # Setup Node.js environment
16
+ - name: Use Node.js
17
+ uses: actions/setup-node@v4
18
+ with:
19
+ node-version: '20.x'
20
+ registry-url: 'https://registry.npmjs.org'
21
+
22
+ # Determine release tag based on the tag name
23
+ - name: Determine release tag
24
+ id: release_tag
25
+ run: |
26
+ if [[ "${{ ' {{' }} github.ref {{ ' }}' }}" == *"-rc"* ]] || [[ "${{ ' {{' }} github.ref {{ ' }}' }}" == *"-RC"* ]]; then
27
+ echo "tag=next" >> "$GITHUB_OUTPUT"
28
+ else
29
+ echo "tag=latest" >> "$GITHUB_OUTPUT"
30
+ fi
31
+
32
+ # Install dependencies (if any) and build your project (if necessary)
33
+ - name: Install dependencies and build
34
+ run: |
35
+ npm install
36
+ npm run build
37
+
38
+ # Publish to NPM with the appropriate tag
39
+ - name: Publish
40
+ run: npm publish --tag ${{ ' {{' }} steps.release_tag.outputs.tag {{ ' }}' }}
41
+ env:
42
+ NODE_AUTH_TOKEN: ${{ ' {{' }} secrets.NPM_TOKEN {{ ' }}' }}
Load Diff This file was deleted.
You can’t perform that action at this time.
0 commit comments