Release v0.7.1 #25
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: MacOS Dev ID | |
on: | |
release: | |
types: [ published ] | |
workflow_dispatch: | |
inputs: | |
tag: | |
description: 'Release Tag' | |
required: true | |
upload: | |
description: 'Upload to release?' | |
type: boolean | |
required: true | |
default: false | |
env: | |
MATCH_GIT_BASIC_AUTHORIZATION: ${{ secrets.MATCH_GIT_BASIC_AUTHORIZATION }} | |
MATCH_PASSWORD: ${{ secrets.MATCH_PASSWORD }} | |
APP_STORE_CONNECT_API_KEY_KEY_ID: ${{ secrets.APP_STORE_KEY_ID }} | |
APP_STORE_CONNECT_API_KEY_ISSUER_ID: ${{ secrets.APP_STORE_ISSUE_ID }} | |
APP_STORE_CONNECT_API_KEY_KEY: ${{ secrets.APP_STORE_API_KEY_P8 }} | |
jobs: | |
release: | |
runs-on: macos-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Setup Xcode version | |
uses: maxim-lobanov/[email protected] | |
with: | |
xcode-version: latest-stable | |
- uses: subosito/flutter-action@v2 | |
with: | |
channel: 'stable' | |
cache: true | |
- name: Flutter version | |
run: flutter --version | |
- name: Install create-dmg | |
run: brew install create-dmg | |
# <-------- START: Utility scripts --------> | |
- name: Get Tag | |
id: GetTag | |
run: echo "tag=$(dart scripts/get_tag.dart ${{ github.event.inputs.tag }} ${{ github.ref }})" >> $GITHUB_OUTPUT | |
- name: Get Pubspec Version | |
id: GetPubspecVersion | |
run: echo "version=$(dart scripts/pubspec_version.dart)" >> $GITHUB_OUTPUT | |
# <-------- END: Utility scripts --------> | |
- name: Install fastlane | |
run: brew install fastlane | |
- name: Fastlane version | |
run: fastlane --version | |
- name: Install Bundler | |
run: gem install bundler | |
- name: Get gem dependencies. | |
run: bundle install | |
- name: Run fastlane | |
run: fastlane mac release_dev_id | |
- name: Validate notarization | |
run: spctl -a -vvv -t install TargetMate.app | |
- name: Rename file | |
run: mv "TargetMate.dmg" "TargetMate-macos-${{ steps.GetTag.outputs.tag }}.dmg" | |
- name: Upload dmg Artifact | |
uses: actions/upload-artifact@v3 | |
with: | |
path: TargetMate-macos-${{ steps.GetTag.outputs.tag }}.dmg | |
if-no-files-found: error | |
retention-days: 5 | |
- name: Upload binaries to Release | |
if: ${{ inputs.upload || github.event_name == 'release' }} | |
uses: svenstaro/upload-release-action@v2 | |
with: | |
repo_token: ${{ secrets.GITHUB_TOKEN }} | |
file: TargetMate-macos-${{ steps.GetTag.outputs.tag }}.dmg | |
tag: refs/tags/${{ steps.GetTag.outputs.tag }} | |
overwrite: true | |
file_glob: true |