From e698cb0f516eed1f09f75ae02a2ed735e7b500d5 Mon Sep 17 00:00:00 2001 From: Rastislav Date: Fri, 21 Aug 2026 20:45:13 +0200 Subject: [PATCH] update --- .github/workflows/publish.yml | 35 ++++++++++++++++------------------- 1 file changed, 16 insertions(+), 19 deletions(-) diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index a00c094..37f1289 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -1,23 +1,20 @@ name: Publish to pub.dev on: - release: - types: - - published - -permissions: - contents: read + push: + tags: + - '*.*.*' jobs: - publish: - name: Publish Dart package + validate: runs-on: ubuntu-latest timeout-minutes: 20 + steps: - name: Check out repository uses: actions/checkout@v4 - - name: Set up Dart + - name: Set up Dart SDK uses: dart-lang/setup-dart@v1 with: sdk: stable @@ -25,13 +22,6 @@ jobs: - name: Install dependencies run: dart pub get - - name: Set up pub.dev credentials - env: - PUB_CREDENTIALS_JSON: ${{ secrets.PUB_CREDENTIALS_JSON }} - run: | - mkdir -p "$HOME/.config/dart" - printf '%s' "$PUB_CREDENTIALS_JSON" | jq -e '.' > "$HOME/.config/dart/pub-credentials.json" - - name: Verify formatting run: dart format --output=none --set-exit-if-changed . @@ -41,8 +31,15 @@ jobs: - name: Run tests run: dart test - - name: Validate package publication + - name: Compile integration client + run: dart compile exe tool/integration_test.dart -o /tmp/core_web3dart_integration_test + + - name: Validate publishable package run: dart pub publish --dry-run - - name: Publish package - run: dart pub publish --force + publish-pub-dev: + if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags/') + needs: validate + permissions: + id-token: write + uses: dart-lang/setup-dart/.github/workflows/publish.yml@v1