feat: publish action #24
Workflow file for this run
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: Publish to pub.dev | |
#on: | |
# push: | |
# tags: | |
# - '[0-9]+.[0-9]+.[0-9]+*' | |
on: | |
pull_request: | |
branches: | |
- main | |
jobs: | |
publish: | |
name: 'Publish to pub.dev' | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Setup Flutter SDK | |
uses: flutter-actions/setup-flutter@v3 | |
with: | |
channel: stable | |
version: 3.0.2 | |
- name: Publish | |
run: flutter pub publish -f | |
# - name: Install dependencies | |
# run: flutter pub get | |
# | |
# - name: Analyze project source | |
# run: dart analyze | |
# | |
# - name: Run tests | |
# run: flutter test | |
#jobs: | |
# publish: | |
# name: 'Publish to pub.dev' | |
# permissions: | |
# id-token: write | |
# uses: dart-lang/setup-dart/.github/workflows/publish.yml@v1 | |
#jobs: | |
# publish: | |
# name: 'Publish to pub.dev' | |
# runs-on: ubuntu-latest | |
# steps: | |
# | |
# - name: Checkout | |
# uses: actions/checkout@v2 | |
# | |
# - uses: actions/setup-java@v1 | |
# with: | |
# java-version: '12.x' | |
# | |
# - uses: subosito/flutter-action@v1 | |
# - run: | | |
# flutter pub publish -f -v | |
#jobs: | |
# publish: | |
# name: 'Publish to pub.dev' | |
# permissions: | |
# id-token: write | |
# uses: dart-lang/setup-dart/.github/workflows/publish.yml@v1 | |
#jobs: | |
# publish: | |
# name: 'Publish to pub.dev' | |
## environment: ${{ inputs.environment }} | |
# permissions: | |
# id-token: write # This is required for requesting the JWT | |
# runs-on: ubuntu-latest | |
# steps: | |
# # Checkout repository | |
# - uses: actions/checkout@v4 | |
# # Setup Dart SDK with JWT token | |
# - uses: dart-lang/setup-dart@fedb1266e91cf51be2fdb382869461a434b920a3 | |
# # Minimal package setup and dry run checks. | |
# - name: Install dependencies | |
# run: dart pub get | |
# working-directory: ${{ inputs.working-directory }} | |
# - name: Publish - dry run | |
# run: dart pub publish --dry-run | |
# working-directory: ${{ inputs.working-directory }} | |
# # Publishing... | |
# - name: Publish to pub.dev | |
# run: flutter pub publish -f | |
# working-directory: ${{ inputs.working-directory }} |