diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index 34b9528..ea5a63e 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -1,28 +1,16 @@ name: Publish to pub.dev on: + pull_request: + branches: [ main ] + types: [opened, synchronize, reopened, labeled, unlabeled] push: tags: - - '[0-9]+.[0-9]+.[0-9]+*' + - '[0-9]+.[0-9]+.[0-9]+' jobs: - build: - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v2 - - name: Install Flutter - uses: subosito/flutter-action@v2 - with: - flutter-version: '3.24.3' - - name: Install dependencies - run: flutter pub get - - name: Analyze - run: flutter analyze - - name: Check Publish Warnings - run: dart pub publish --dry-run - - name: Publish - uses: k-paxian/dart-package-publisher@v1.5.1 - with: - credentialJson: ${{ secrets.PUB_CREDENTIALS }} - flutter: true - skipTests: true \ No newline at end of file + publish: + uses: dart-lang/ecosystem/.github/workflows/publish.yaml@main + permissions: + id-token: write + pull-requests: write