Skip to content

Commit

Permalink
Merge pull request #16 from priyanshuverma-dev/build-worklow
Browse files Browse the repository at this point in the history
workflow improved
  • Loading branch information
priyanshuverma-dev authored Jul 10, 2024
2 parents e5e86d4 + cfb40ec commit 9ac0937
Show file tree
Hide file tree
Showing 2 changed files with 35 additions and 24 deletions.
40 changes: 22 additions & 18 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,4 @@
on:
workflow_run:
workflows: ['Integration Tests']
types: [completed]
push:
branches:
- main
Expand All @@ -15,30 +12,37 @@ jobs:
name: Build & Release
runs-on: windows-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-java@v3
with:
java-version: '11'
distribution: 'temurin'
- uses: subosito/flutter-action@v2
with:
channel: stable
flutter-version: '3.19.5'
- name: Dependencies install
run: flutter pub get
- name: Integration Test
run: flutter test -d windows integration_test\app_test.dart
- name: Build For Windows
- name: Checkout 🛎️
uses: actions/checkout@v3
# - uses: actions/setup-java@v3
# with:
# java-version: '11'
# distribution: 'temurin'
# - uses: subosito/flutter-action@v2
# with:
# channel: stable
# flutter-version: '3.19.5'
# - name: Dependencies install
# run: flutter pub get

- name: Integration Test 🧪
uses: ./.github/workflows/tests

- name: Building exe for Windows ⚡
run: flutter build windows --release --build-name 1.1.${{ github.run_number }} --build-number ${{ github.run_number }}

- name: Archive Release
uses: thedoctor0/zip-release@master
with:
type: 'zip'
filename: Sangeet-v1.1.${{ github.run_number }}_windows_x64.zip
directory: build/windows/x64/runner/Release

- name: Push to Releases
uses: ncipollo/release-action@v1
with:
artifacts: "build/windows/x64/runner/Release/Sangeet-v1.1.${{ github.run_number }}_windows_x64.zip"
tag: v1.1.${{ github.run_number }}
token: ${{ secrets.GITHUB_TOKEN }}
token: ${{ secrets.GITHUB_TOKEN }}
draft: true
generateReleaseNotes: true
19 changes: 13 additions & 6 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,18 +16,25 @@ jobs:
name: Run Integration Tests
runs-on: windows-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-java@v3
- name: Checkout 🛎️
uses: actions/checkout@v3

- name: Java Setup 🔎
uses: actions/setup-java@v3
with:
java-version: '11'
distribution: 'temurin'
- uses: subosito/flutter-action@v2

- name: Flutter setup 🔎
uses: subosito/flutter-action@v2
with:
channel: stable
flutter-version: '3.19.5'

- name: Dependencies install
run: flutter pub get
- name: Test For Windows

- name: Integration Test 🧪
run: flutter test -d windows integration_test\app_test.dart
- name: Build For Windows
run: flutter build windows

0 comments on commit 9ac0937

Please sign in to comment.