Skip to content
Open
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
49 changes: 49 additions & 0 deletions .github/workflows/app_build.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
name: NoPorts Desktop Builds

on:
push:
branches:
- trunk
Comment on lines +3 to +6
Copy link
Member

@XavierChanth XavierChanth Feb 3, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This should be on tag d*.*.* (d for desktop) & optionally on workflow_dispatch. We shouldn't rebuild the app everytime something is pushed to trunk

permissions: # added using https://github.com/step-security/secure-repo
contents: read

jobs:
windows_build:
name: Windows Build
runs-on: windows-latest
steps:
- uses: actions/checkout@v4
Copy link
Member

@XavierChanth XavierChanth Feb 3, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

See some of the other workflows, please use commit SHAs (for all of the uses statements)


- name: Set up Flutter
uses: subosito/flutter-action@v2
with:
channel: "stable"
flutter-version-file: "3.24.5"
- run: flutter pub get

- name: Build msix file with Dart SDK
uses: dart-lang/setup-dart@v1
with:
sdk: stable
- run: dart run msix:create
Comment on lines +24 to +28
Copy link
Member

@XavierChanth XavierChanth Feb 3, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

prefer calling all of the setup environment uses first, then do all of the runs.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You also don't need to setup dart if you've already setup flutter. Dart binary is installed with Flutter.


- name: Create Github Release
id: create_release
uses: actions/create-release@v1
env:
GITHUB_TOKEN: ${{ github.token }}
with:
tag_name: ${{ github.ref }}
release_name: Release ${{ github.ref }}
draft: false
prerelease: false

- name: Upload msix Asset
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ github.token }}
with:
upload_url: ${{ steps.create_release.outputs.upload_url }}
asset_path: ./packages/dart/npt_flutter/build/x64/runner/release/npt_flutter.msix
asset_name: noPorts-Desktop.msix
asset_content_type: application/vnd.ms-appx