diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml index 55d4244..967e6ec 100644 --- a/.github/workflows/deploy.yml +++ b/.github/workflows/deploy.yml @@ -1,8 +1,6 @@ name: CI -on: - push: - branches: - - master +on: [push] + jobs: deploy: runs-on: macos-latest @@ -21,8 +19,15 @@ jobs: with: flutter-version: "1.26.0-1.0.pre" channel: "dev" + - name: Install Go + uses: actions/setup-go@v2 + with: + go-version: 1.15.x - name: Install tools run: | + brew update + brew install yq + GO111MODULE=on go get -u -a github.com/go-flutter-desktop/hover flutter pub get flutter build ios --release --no-codesign cd ./ios && pod install @@ -42,10 +47,11 @@ jobs: PRIVATE_KEY: ${{ secrets.SSH_PRIVATE_KEY }} - name: Deploy to TestFlight run: | + make build-macos cd ./ios bundle exec fastlane match development --readonly security find-identity -v -p codesigning - bundle exec fastlane beta --verbose + bundle exec fastlane mac release -- verbose env: TEAM_ID: ${{ secrets.TEAM_ID }} ITC_TEAM_ID: ${{ secrets.ITC_TEAM_ID }} diff --git a/.gitignore b/.gitignore index c631c54..5943ce3 100644 --- a/.gitignore +++ b/.gitignore @@ -74,3 +74,4 @@ ios/*.zip artifacts ios/*.ipa .flutter-plugins-dependencies +ios/fastlane/report.xml diff --git a/Makefile b/Makefile index d353cf8..3941a3e 100644 --- a/Makefile +++ b/Makefile @@ -1,9 +1,7 @@ NAME = $(shell yq e '.name' pubspec.yaml) VERSION = $(shell yq e '.version' pubspec.yaml) -CERT_NAME := LNCQ7FYZE7 -APPLE_USERNAME := george@noodles.gr -APPLE_PASSWORD := @keychain:AC_PASSWORD +CERT_NAME := Developer ID Application: 0x2A Ltd (LNCQ7FYZE7) GOMOBILE_PKG := nimona.io/plugins/flutter APP_PATH := $(CURDIR) @@ -63,8 +61,8 @@ release-ios: .PHONE: release-ios-verify release-ios-verify: @xcrun altool \ - --username "$(APPLE_USERNAME)" \ - --password "$(APPLE_PASSWORD)" \ + --username "$(FASTLANE_USER)" \ + --password "$(FASTLANE_APPLE_APPLICATION_SPECIFIC_PASSWORD)" \ --notarization-info $(REQ_ID) .PHONY: build-macos @@ -92,7 +90,7 @@ build-macos: @xcrun altool \ --notarize-app \ --primary-bundle-id "io.nimona.$(NAME)" \ - --username "$(APPLE_USERNAME)" \ - --password "$(APPLE_PASSWORD)" \ + --username "$(FASTLANE_USER)" \ + --password "$(FASTLANE_APPLE_APPLICATION_SPECIFIC_PASSWORD)" \ --file ./artifacts/$(NAME)-$(VERSION).app.zip @echo "All done!" diff --git a/go/go.mod b/go/go.mod index b2b19b4..f7ad603 100644 --- a/go/go.mod +++ b/go/go.mod @@ -36,7 +36,7 @@ require ( // replace github.com/zserge/metric => ../../metric -replace nimona.io => ../../../../nimona.io +// replace nimona.io => ../../../../nimona.io // replace github.com/go-flutter-desktop/go-flutter => ../../go-flutter diff --git a/go/packaging/darwin-pkg/flat/Distribution.tmpl b/go/packaging/darwin-pkg/flat/Distribution.tmpl new file mode 100644 index 0000000..2f65fcc --- /dev/null +++ b/go/packaging/darwin-pkg/flat/Distribution.tmpl @@ -0,0 +1,12 @@ + + + {{.applicationName}} + + + + + + + + #base.pkg + diff --git a/go/packaging/darwin-pkg/flat/base.pkg/PackageInfo.tmpl b/go/packaging/darwin-pkg/flat/base.pkg/PackageInfo.tmpl new file mode 100644 index 0000000..5751919 --- /dev/null +++ b/go/packaging/darwin-pkg/flat/base.pkg/PackageInfo.tmpl @@ -0,0 +1,5 @@ + + + + + diff --git a/ios/fastlane/Appfile b/ios/fastlane/Appfile index 30d02a9..1c6c9e6 100644 --- a/ios/fastlane/Appfile +++ b/ios/fastlane/Appfile @@ -1,8 +1,5 @@ -app_identifier("io.nimona.identity") # The bundle identifier of your app -apple_id("george@noodles.gr") # Your Apple email address +app_identifier("io.nimona.identity") +apple_id("bot@nimona.io") -itc_team_id("120343054") # App Store Connect Team ID -team_id("LNCQ7FYZE7") # Developer Portal Team ID - -# For more information about the Appfile, see: -# https://docs.fastlane.tools/advanced/#appfile +itc_team_id("120343054") +team_id("LNCQ7FYZE7") diff --git a/ios/fastlane/Fastfile b/ios/fastlane/Fastfile index 7a671a2..1041aca 100644 --- a/ios/fastlane/Fastfile +++ b/ios/fastlane/Fastfile @@ -18,4 +18,30 @@ platform :ios do ) upload_to_testflight end +end +platform :mac do + desc "Push a new build to macos store" + lane :release do + # setup_ci + # sync_code_signing( + # type: "appstore", + # readonly: is_ci + # ) + # build_app( + # workspace: "Runner.xcworkspace", + # scheme: "Runner", + # ) + app_store_connect_api_key( + key_id: ENV["APPSTORE_CONNECT_KEYID"], + issuer_id: ENV["APPSTORE_CONNECT_ISSUERID"], + key_content: ENV["APPSTORE_CONNECT_PRIVATE_KEY"] + ) + notarize( + verbose: true, + package: "../go/build/outputs/darwin-bundle-release/identity 1.7.0.app", + bundle_id: "io.nimona.identity", + asc_provider: ENV["ITC_TEAM_ID"] # "LNCQ7FYZE7" + ) + # upload_to_testflight + end end \ No newline at end of file diff --git a/ios/fastlane/README.md b/ios/fastlane/README.md index f213a16..e873fc0 100644 --- a/ios/fastlane/README.md +++ b/ios/fastlane/README.md @@ -24,6 +24,15 @@ Push a new beta build to TestFlight ---- +## Mac +### mac release +``` +fastlane mac release +``` +Push a new build to macos store + +---- + This README.md is auto-generated and will be re-generated every time [fastlane](https://fastlane.tools) is run. More information about fastlane can be found on [fastlane.tools](https://fastlane.tools). The documentation of fastlane can be found on [docs.fastlane.tools](https://docs.fastlane.tools).