Release v0.6.6 #22
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: Windows Release | |
on: | |
release: | |
types: [ published ] | |
workflow_dispatch: | |
inputs: | |
tag: | |
description: 'Release Tag' | |
required: true | |
upload: | |
description: 'Upload to release?' | |
type: boolean | |
required: true | |
default: false | |
jobs: | |
build: | |
runs-on: windows-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Configure git for long paths | |
run: git config --system core.longpaths true | |
- name: Install Flutter | |
uses: subosito/[email protected] | |
with: | |
channel: stable | |
cache: true | |
- name: Flutter version | |
run: flutter --version | |
- name: Install dependencies | |
run: flutter pub get | |
# <-------- START: Utility scripts --------> | |
- name: Get Tag | |
id: GetTag | |
shell: bash | |
run: echo "tag=$(dart scripts/get_tag.dart ${{ github.event.inputs.tag }} ${{ github.ref }})" >> $GITHUB_OUTPUT | |
- name: Get Pubspec Version | |
id: GetPubspecVersion | |
shell: bash | |
run: echo "version=$(dart scripts/pubspec_version.dart)" >> $GITHUB_OUTPUT | |
# <-------- END: Utility scripts --------> | |
- name: Build | |
run: flutter build windows --dart-define-from-file=configs/github.json | |
- name: Setup MSIX configs | |
run: dart installers\msix\setup.dart installers\msix\ci.yaml ${{ secrets.WIN_CERT_PASSWORD }} | |
- name: Create MSIX Installer | |
run: flutter pub run msix:create | |
- name: Rename file | |
run: ren TargetMate.msix TargetMate-windows-${{ steps.GetTag.outputs.tag }}.msix | |
- name: Upload Artifacts | |
uses: actions/upload-artifact@v3 | |
with: | |
path: TargetMate-windows-${{ steps.GetTag.outputs.tag }}.msix | |
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-windows-${{ steps.GetTag.outputs.tag }}.msix | |
tag: refs/tags/${{ steps.GetTag.outputs.tag }} | |
overwrite: true | |
file_glob: true |