-
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.
chore: add CI workflow for publishing to pub.dev
- Introduced a new GitHub Actions workflow in `ci.yml` to handle publishing to pub.dev for both prerelease and stable branches. - The workflow includes steps for checking out the repository, setting up Flutter, and using the melos-action for versioning and publishing. - Updated the existing `publish.yml` to trigger on tags instead of branches, streamlining the publishing process. - Enhanced permissions for better access control during the CI/CD process.
- Loading branch information
1 parent
8455ce3
commit 25b64c0
Showing
2 changed files
with
63 additions
and
49 deletions.
There are no files selected for viewing
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,56 @@ | ||
name: Publish to pub.dev | ||
|
||
on: | ||
push: | ||
branches: | ||
- main | ||
- stable | ||
|
||
jobs: | ||
prerelease: | ||
if: github.ref == 'refs/heads/main' | ||
runs-on: ubuntu-latest | ||
permissions: | ||
id-token: write | ||
contents: write | ||
pull-requests: write | ||
|
||
steps: | ||
- uses: actions/checkout@v4 | ||
with: | ||
token: ${{ secrets.GITHUB_TOKEN }} | ||
|
||
- uses: subosito/flutter-action@v2 | ||
|
||
- uses: bluefireteam/melos-action@v3 | ||
with: | ||
run-versioning-prerelease: true | ||
tag: true | ||
git-email: "[email protected]" | ||
git-name: "GitHub Actions Bot" | ||
create-pr: true | ||
publish-dry-run: true | ||
|
||
stable: | ||
if: github.ref == 'refs/heads/stable' | ||
runs-on: ubuntu-latest | ||
permissions: | ||
id-token: write | ||
contents: write | ||
pull-requests: write | ||
|
||
steps: | ||
- uses: actions/checkout@v4 | ||
with: | ||
token: ${{ secrets.GITHUB_TOKEN }} | ||
|
||
- uses: subosito/flutter-action@v2 | ||
|
||
- uses: bluefireteam/melos-action@v3 | ||
with: | ||
run-versioning: true | ||
tag: true | ||
git-email: "[email protected]" | ||
git-name: "GitHub Actions Bot" | ||
create-pr: true | ||
publish-dry-run: true |
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 |
---|---|---|
|
@@ -2,55 +2,13 @@ name: Publish to pub.dev | |
|
||
on: | ||
push: | ||
branches: | ||
- main | ||
- stable | ||
tags: | ||
- "tagflow-v[0-9]+.[0-9]+.[0-9]+*" | ||
|
||
jobs: | ||
prerelease: | ||
if: github.ref == 'refs/heads/main' | ||
runs-on: ubuntu-latest | ||
publish: | ||
permissions: | ||
id-token: write | ||
contents: write | ||
pull-requests: write | ||
|
||
steps: | ||
- uses: actions/checkout@v4 | ||
with: | ||
token: ${{ secrets.GITHUB_TOKEN }} | ||
|
||
- uses: subosito/flutter-action@v2 | ||
|
||
- uses: bluefireteam/melos-action@v3 | ||
with: | ||
run-versioning-prerelease: true | ||
tag: true | ||
git-email: "[email protected]" | ||
git-name: "GitHub Actions Bot" | ||
create-pr: true | ||
publish-dry-run: true | ||
|
||
stable: | ||
if: github.ref == 'refs/heads/stable' | ||
runs-on: ubuntu-latest | ||
permissions: | ||
id-token: write | ||
contents: write | ||
pull-requests: write | ||
|
||
steps: | ||
- uses: actions/checkout@v4 | ||
with: | ||
token: ${{ secrets.GITHUB_TOKEN }} | ||
|
||
- uses: subosito/flutter-action@v2 | ||
|
||
- uses: bluefireteam/melos-action@v3 | ||
with: | ||
run-versioning: true | ||
tag: true | ||
git-email: "[email protected]" | ||
git-name: "GitHub Actions Bot" | ||
create-pr: true | ||
publish-dry-run: true | ||
id-token: write # Required for authentication using OIDC | ||
uses: dart-lang/setup-dart/.github/workflows/publish.yml@v1 | ||
with: | ||
working-directory: packages/tagflow |