Skip to content

Commit

Permalink
chore(ci): add automated publishing to pub dev on tag push (#45)
Browse files Browse the repository at this point in the history
* chore(ci): add automated publishing to pub dev on tag push
* chore(ci): remove on branch protection
* chore: rm unnecessary dart language setup
  • Loading branch information
smallTrogdor authored Nov 21, 2024
1 parent 031f190 commit 32953cd
Showing 1 changed file with 26 additions and 0 deletions.
26 changes: 26 additions & 0 deletions .github/workflows/publish_pub_dev.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
name: Publish to pub.dev

on:
push:
tags:
- "[0-9]+.[0-9]+.[0-9]+" # tag pattern on pub.dev: '{{version}'

# Publish using custom workflow
jobs:
publish:
permissions:
id-token: write # Required for authentication using OIDC
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4

- uses: subosito/flutter-action@v2
with:
channel: stable
cache: true

- run: flutter doctor -v
- run: flutter pub get
- run: dart run build_runner build --delete-conflicting-outputs

- run: flutter pub publish --force

0 comments on commit 32953cd

Please sign in to comment.