Socket client - Publish package #2
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
name: Socket client - Publish to pub.dev | |
on: | |
workflow_run: | |
types: completed | |
workflows: Socket client - Configure pakcage | |
permissions: | |
contents: write | |
issues: write | |
pull-requests: write | |
id-token: write | |
jobs: | |
publish_superviz_socket_client: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Setup Dart SDK | |
uses: dart-lang/setup-dart@v1 | |
with: | |
sdk: stable | |
- run: git config --global user.name SuperViz | |
- run: git config --global user.email [email protected] | |
- name: Intalling dependencies | |
run: | | |
cd packages/socket-client | |
dart pub get | |
- name: Analyze project source | |
run: | | |
cd packages/socket-client | |
dart analyze | |
- name: Verify formatting | |
run: | | |
cd packages/socket-client | |
dart format --output=write --set-exit-if-changed . | |
- name: Commit changes | |
run: | | |
git add . | |
git commit -m "chore(release): format code [skip ci]" || echo "No changes to commit" | |
git push --follow-tags | |
- name: Running build runner | |
run: | | |
cd packages/socket-client | |
dart run build_runner build | |
- name: Running tests | |
run: | | |
cd packages/socket-client | |
dart test | |
- name: Publish | |
run: | | |
cd packages/socket-client | |
dart pub publish |