Merge pull request #19 from moesaid/stage #11
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
on: | |
push: | |
branches: [main] | |
name: Windows | |
jobs: | |
build-windows: | |
name: "Build Windows for MS Store" | |
runs-on: windows-latest | |
timeout-minutes: 30 | |
env: | |
GITHUB_TOKEN: ${{ secrets.GIT_TOKEN }} | |
steps: | |
- uses: actions/[email protected] | |
- name: read yaml | |
id: read_action_js | |
uses: pietrobolcato/[email protected] | |
with: | |
config: ${{ github.workspace }}/pubspec.yaml | |
- name: Create Version Number | |
id: versions | |
run: | | |
echo "::set-output name=version::${{ steps.read_action_js.outputs['version'] }}" | |
- name: Setup Flutter SDK | |
uses: subosito/[email protected] | |
with: | |
channel: "stable" | |
- name: Enable desktop | |
run: flutter config --enable-windows-desktop | |
- name: Generate MSIX-compatible version | |
uses: ashley-taylor/[email protected] | |
id: msixver | |
with: | |
value: ${{steps.versions.outputs.version }} | |
regex: (\-\w+)|(\+\w+) | |
replacement: "" | |
- name: Write MSIX | |
uses: DamianReeves/[email protected] | |
with: | |
path: pubspec.yaml | |
contents: | | |
msix_config: | |
display_name: FlutterPP | |
publisher_display_name: waqtollcapps | |
identity_name: waqtollcapps.FlutterPP | |
publisher: CN=52C80A4B-6F71-430C-88F2-0AFF0C54D249 | |
msix_version: ${{steps.msixver.outputs.value }}.0 | |
logo_path: assets\windwos.png | |
architecture: x64 | |
capabilities: "internetClient,removableStorage" | |
certificate_path: windows/CERTIFICATE.pfx | |
certificate_password: ${{ secrets.PROD_WIN_CERTIFICATE_PWD }} | |
write-mode: append | |
- name: Flutter get packages | |
run: flutter pub get | |
- name: Flutter build app | |
run: flutter build windows | |
- name: Create MSIX | |
run: flutter pub run msix:create | |
- name: Upload MSIX to release | |
uses: svenstaro/[email protected] | |
with: | |
repo_token: ${{ secrets.GITHUB_TOKEN }} | |
file: build/windows/x64/Runner/release/FlutterPP.msix | |
asset_name: FlutterPP-windows-${{ steps.versions.outputs.version }}-MS-NS.msix | |
tag: ${{ steps.versions.outputs.version }} | |
release_name: Release ${{ steps.versions.outputs.version }} |