add GitHub Actions configuration to automatically publish to pub.dev from Github
This commit is contained in:
parent
72a0f5931d
commit
a5c8e6f310
37
.github/workflows/publish.yml
vendored
Normal file
37
.github/workflows/publish.yml
vendored
Normal file
@ -0,0 +1,37 @@
|
|||||||
|
name: Publish to pub.dev
|
||||||
|
|
||||||
|
on:
|
||||||
|
push:
|
||||||
|
tags:
|
||||||
|
- '[0-9]+.[0-9]+.[0-9]+*'
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
publish:
|
||||||
|
name: Publish to pub.dev
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
environment: pub.dev
|
||||||
|
permissions:
|
||||||
|
id-token: write # Required for authentication using OIDC
|
||||||
|
steps:
|
||||||
|
# Checkout repository
|
||||||
|
- name: Checkout repository
|
||||||
|
uses: actions/checkout@v4
|
||||||
|
# This action adds a token needed for pub.dev
|
||||||
|
- name: Install Dart
|
||||||
|
uses: dart-lang/setup-dart@v1
|
||||||
|
with:
|
||||||
|
sdk: stable
|
||||||
|
# Install Flutter
|
||||||
|
- name: Install Flutter
|
||||||
|
uses: subosito/flutter-action@v2
|
||||||
|
with:
|
||||||
|
channel: stable
|
||||||
|
# Minimal package setup and dry run checks.
|
||||||
|
- name: Install dependencies
|
||||||
|
run: flutter pub get
|
||||||
|
# Publish package with dry run
|
||||||
|
- name: Publish dry run
|
||||||
|
run: flutter pub publish --dry-run
|
||||||
|
# Publishing...
|
||||||
|
- name: Publish to pub.dev
|
||||||
|
run: flutter pub publish -f
|
Loading…
x
Reference in New Issue
Block a user