Skip to content

Commit

Permalink
build: 💚 Add Github action to publish on pub.dev
Browse files Browse the repository at this point in the history
  • Loading branch information
Chralu committed Sep 3, 2024
1 parent 31632ac commit 6b3c889
Showing 1 changed file with 33 additions and 0 deletions.
33 changes: 33 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
name: Publish to pub.dev

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

# 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: dart-lang/setup-dart@v1
- name: Set up Flutter
uses: subosito/flutter-action@v2
with:
channel: "stable"
flutter-version: "3.22.3"
- name: Install dependencies
run: flutter pub get
- uses: actions/setup-node@v4
with:
node-version: 20.17.0
- name: Install typescript dependencies
run: npm install
- name: Build typescript
run: npm run build
- name: Publish
run: dart pub publish --force

0 comments on commit 6b3c889

Please sign in to comment.