Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions .github/CODEOWNERS
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
# Every change needs review from the repository owner.
* @JanMichaelPeter
46 changes: 46 additions & 0 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
name: Publish to pub.dev

# Runs when a version tag like v0.1.0 is pushed. The job waits for approval
# in the pub.dev environment, and pub.dev only accepts uploads from this
# repository's tags through that environment.
on:
push:
tags:
- 'v[0-9]+.[0-9]+.[0-9]+*'

concurrency:
group: publish
cancel-in-progress: false

env:
FLUTTER_VERSION: 3.38.1

jobs:
publish:
name: Publish
runs-on: ubuntu-latest
environment: pub.dev
permissions:
contents: read
id-token: write # pub.dev authenticates the upload with a GitHub OIDC token
steps:
- uses: actions/checkout@v4
# Sets up the OIDC credentials that `flutter pub publish` uses.
- uses: dart-lang/setup-dart@v1
- uses: subosito/flutter-action@v2
with:
channel: stable
flutter-version: ${{ env.FLUTTER_VERSION }}
cache: true
- name: Check tag matches pubspec version
run: |
VERSION=$(sed -n 's/^version: *//p' pubspec.yaml)
if [ "v$VERSION" != "$GITHUB_REF_NAME" ]; then
echo "::error::Tag $GITHUB_REF_NAME does not match pubspec.yaml version $VERSION"
exit 1
fi
- run: flutter pub get
- run: flutter analyze
- run: flutter test
- run: flutter pub publish --dry-run
- run: flutter pub publish --force
3 changes: 3 additions & 0 deletions pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ environment:
dependencies:
flutter:
sdk: flutter
meta: ^1.17.0
plugin_platform_interface: ^2.0.2

dev_dependencies:
Expand All @@ -27,3 +28,5 @@ flutter:
pluginClass: WindowPlacementPlugin
ios:
pluginClass: WindowPlacementPlugin
config:
enable-swift-package-manager: true
Loading