Skip to content

Commit

Permalink
Add github release action
Browse files Browse the repository at this point in the history
  • Loading branch information
qiuxiang committed Oct 1, 2021
1 parent ce087fd commit 66c6523
Show file tree
Hide file tree
Showing 3 changed files with 29 additions and 1 deletion.
25 changes: 25 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
name: release
on:
release:
types: [published]
jobs:
release:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/setup-java@v1
with:
java-version: 12
- uses: subosito/flutter-action@v1
with:
channel: stable
- uses: bruceadams/[email protected]
id: release
env:
GITHUB_TOKEN: ${{ github.token }}
- run: |
echo '${{ secrets.CREDENTIALS_JSON }}' > $(which flutter | sed -r 's/bin\/flutter/.pub-cache\/credentials.json/')
export version=$(echo ${{ steps.release.outputs.tag_name }} | sed s/v//)
sed -i -r "s/version: .*/version: $version/" pubspec.yaml
sed -i "1s/^/## $version\n\n${{ steps.release.outputs.body }}\n\n/" CHANGELOG.md
flutter pub publish -f
2 changes: 2 additions & 0 deletions .pubignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
build/
pigeon.dart
3 changes: 2 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,5 +3,6 @@
A new flutter plugin project.

```
mkdir android/src/main/java/qiuxiang/android_window -p
flutter pub run pigeon --input lib/pigeon.dart --dart_out lib/pigeon.g.dart --java_out android/src/main/java/qiuxiang/android_window/Pigeon.java --java_package "qiuxiang.android_window"
```
```

0 comments on commit 66c6523

Please sign in to comment.