forked from trevorwang/retrofit.dart
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
ci: update ci to support retrofit publish
- Loading branch information
1 parent
a11998e
commit c9a994e
Showing
3 changed files
with
32 additions
and
2 deletions.
There are no files selected for viewing
2 changes: 1 addition & 1 deletion
2
.github/workflows/dart.yml → .github/workflows/publish-generator.yml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
# .github/workflows/publish.yml | ||
name: Publish to pub.dev | ||
name: Publish retrofit_generator to pub.dev | ||
|
||
on: | ||
push: | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
# .github/workflows/publish.yml | ||
name: Publish retrofit to pub.dev | ||
|
||
on: | ||
push: | ||
tags: | ||
- 'retrofit-[0-9]+.[0-9]+.[0-9]+*' | ||
|
||
# Publish using custom workflow | ||
jobs: | ||
publish: | ||
permissions: | ||
id-token: write # Required for authentication using OIDC | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v3 | ||
- uses: dart-lang/setup-dart@v1 | ||
- name: Install dependencies | ||
run: cd retrofit && dart pub get | ||
# Here you can insert custom steps you need | ||
# - run: dart tool/generate-code.dart | ||
- name: Config examples | ||
run: cp -r example retrofit/example | ||
- name: Release new version | ||
run: | | ||
cd retrofit | ||
RELEASE=${GITHUB_REF##*/} | ||
sed -i -e "s/version:.*/version: $RELEASE/g" pubspec.yaml | ||
- name: Publish | ||
run: cd retrofit && dart pub publish --force |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -11,7 +11,7 @@ jobs: | |
strategy: | ||
matrix: | ||
os: [ubuntu-latest] | ||
sdk: [stable, 2.19.6] | ||
sdk: [2.19.6, stable] | ||
steps: | ||
- uses: actions/[email protected] | ||
- uses: dart-lang/[email protected] | ||
|