Skip to content

Commit

Permalink
chore
Browse files Browse the repository at this point in the history
  • Loading branch information
mg3994 committed Jul 17, 2024
1 parent cd358fc commit cd24d79
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 3 deletions.
9 changes: 7 additions & 2 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ name: Publish to pub.dev

on:
repository_dispatch:
types: [test_workflow_completed]
types: [master_workflow_completed]

workflow_dispatch:
# push:
Expand All @@ -22,6 +22,10 @@ jobs:
git config --local user.email "github-actions[bot]@users.noreply.github.com"
git config --local user.name "github-actions[bot]"
- name: Determine branch name
id: determine_branch
run: echo "::set-output name=branch::$(echo ${GITHUB_REF#refs/heads/})"

- name: 🎯 Setup Dart
uses: dart-lang/setup-dart@v1
with:
Expand All @@ -42,6 +46,7 @@ jobs:
args: -vv --latest --no-exec --github-repo ${{ github.repository }}
env:
OUTPUT: CHANGES.md

- name: Commit version bump
run: |
git add pubspec.yaml README.md
Expand All @@ -63,4 +68,4 @@ jobs:
run: echo $PUB_DEV_CREDENTIALS | dart pub publish --force

- name: Push changes
run: git push origin main
run: git push origin ${{ steps.determine_branch.outputs.branch }}
2 changes: 1 addition & 1 deletion .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -39,4 +39,4 @@ jobs:
-H "Accept: application/vnd.github.v3+json" \
-H "Authorization: token ${{ secrets.GITHUB_TOKEN }}" \
https://api.github.com/repos/${{ github.repository }}/dispatches \
-d '{"event_type":"test_workflow_completed"}'
-d '{"event_type":"master_workflow_completed"}'

0 comments on commit cd24d79

Please sign in to comment.