Skip to content

Commit 09d31bb

Browse files
committed
chore: updated release workflows
1 parent a0f3ca2 commit 09d31bb

File tree

4 files changed

+27
-40
lines changed

4 files changed

+27
-40
lines changed

.github/labeler.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,3 +10,6 @@ docs:
1010
- 'README.md'
1111
- 'CHANGELOG.md'
1212
- 'LICENSE'
13+
workspace:
14+
- 'melos.yaml'
15+
- 'pubspec.yaml'

.github/workflows/release.yml

Lines changed: 20 additions & 38 deletions
Original file line numberDiff line numberDiff line change
@@ -10,45 +10,27 @@ on:
1010
jobs:
1111
test:
1212
uses: gibahjoe/openapi-generator-dart/.github/workflows/code_quality.yml@master
13-
publish-cli:
13+
publish:
14+
name: Publish Packages with Melos
1415
runs-on: ubuntu-latest
1516
needs: [test]
1617
steps:
1718
- name: Checkout
18-
uses: actions/checkout@v1
19-
- name: Publish
20-
uses: sakebook/[email protected]
21-
with:
22-
credential: ${{ secrets.PUB_CREDENTIAL_JSON }}
23-
package_directory: ./openapi-generator-cli
24-
flutter_package: true
25-
skip_test: true
26-
dry_run: false
27-
publish-annotation:
28-
runs-on: ubuntu-latest
29-
needs: [test]
30-
steps:
31-
- name: Checkout
32-
uses: actions/checkout@v1
33-
- name: Publish
34-
uses: sakebook/[email protected]
35-
with:
36-
credential: ${{ secrets.PUB_CREDENTIAL_JSON }}
37-
package_directory: ./openapi-generator-annotations
38-
flutter_package: true
39-
skip_test: true
40-
dry_run: false
41-
publish-generator:
42-
runs-on: ubuntu-latest
43-
needs: [publish-annotation, publish-cli]
44-
steps:
45-
- name: Checkout
46-
uses: actions/checkout@v1
47-
- name: Publish
48-
uses: sakebook/[email protected]
49-
with:
50-
credential: ${{ secrets.PUB_CREDENTIAL_JSON }}
51-
package_directory: ./openapi-generator
52-
flutter_package: true
53-
skip_test: false
54-
dry_run: false
19+
uses: actions/checkout@v3
20+
21+
- name: Setup Dart
22+
uses: dart-lang/setup-dart@v1
23+
24+
- name: Install Melos
25+
run: dart pub global activate melos
26+
27+
- name: Authenticate with Pub
28+
run: echo "${{ secrets.PUB_CREDENTIAL_JSON }}" > ~/.pub-cache/credentials.json
29+
30+
- name: Bootstrap Melos
31+
run: melos bootstrap
32+
33+
- name: Version and Publish
34+
run: |
35+
melos version --yes --no-changelog
36+
melos publish --no-dry-run --yes

.github/workflows/release_please.yml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,9 @@ permissions:
1010

1111
jobs:
1212
release-please:
13-
if: github.event.pull_request.merged == true && !startsWith(github.event.pull_request.title, 'chore(release):')
13+
if: >
14+
github.event_name == 'push' ||
15+
(github.event.pull_request.merged == true && !startsWith(github.event.pull_request.title, 'chore(release):'))
1416
runs-on: ubuntu-latest
1517
steps:
1618
- uses: google-github-actions/release-please-action@v3

example/api/petstore_api/pubspec.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ description: OpenAPI API client
44
homepage: homepage
55

66
environment:
7-
sdk: '>=2.15.0 <3.0.0'
7+
sdk: '>=2.15.0 <4.0.0'
88

99
dependencies:
1010
dio: '^5.2.0'

0 commit comments

Comments
 (0)