mirror of
https://github.com/RxReader/wechat_kit.git
synced 2025-08-06 15:20:24 +08:00
31 lines
945 B
Dart
31 lines
945 B
Dart
name: publish
|
|
|
|
on:
|
|
workflow_dispatch:
|
|
release:
|
|
types: [published]
|
|
|
|
jobs:
|
|
publish:
|
|
name: Publish
|
|
runs-on: macos-latest
|
|
steps:
|
|
- uses: actions/checkout@v3
|
|
- uses: subosito/flutter-action@v2
|
|
with:
|
|
channel: 'stable'
|
|
- name: Run pub.dev/inject-credentials@shell
|
|
env:
|
|
# Mac: ~/Library/Application\ Support/dart/pub-credentials.json
|
|
# Linux: $HOME/.config/dart/pub-credentials.json
|
|
# Windows: %APPDATA%/dart/pub-credentials.json
|
|
# Windows: %LOCALAPPDATA%/dart/pub-credentials.json
|
|
CREDENTIALS: ${{ secrets.CREDENTIALS_JSON }}
|
|
run: |
|
|
mkdir -p ~/Library/Application\ Support/dart
|
|
echo $CREDENTIALS > ~/Library/Application\ Support/dart/pub-credentials.json
|
|
- run: flutter --version
|
|
- run: flutter pub get
|
|
- run: dart format --set-exit-if-changed .
|
|
- run: echo "y" | flutter pub publish
|