ci: debug InnoSetup #69
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: Build | Release | |
on: | |
push: | |
branches: | |
- main | |
- dev | |
jobs: | |
get_version: | |
name: Get version | |
environment: release | |
runs-on: ubuntu-latest | |
outputs: | |
version: ${{ steps.echo_version.outputs.version }} | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
- name: Get version | |
id: get_version | |
uses: mikefarah/yq@master | |
with: | |
cmd: yq -r '.version' 'pubspec.yaml' | |
- name: Echo version | |
id: echo_version | |
run: echo "version=${{ steps.get_version.outputs.result }}" >> "$GITHUB_OUTPUT" | |
build_android: | |
name: Android | |
environment: release | |
runs-on: ubuntu-latest | |
needs: [ get_version ] | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
- name: Setup Java | |
uses: actions/setup-java@v3 | |
with: | |
distribution: 'zulu' | |
java-version: '11' | |
- name: Setup Flutter | |
uses: subosito/flutter-action@v2 | |
with: | |
channel: 'stable' | |
- name: Add keystore | |
run: echo "${{ secrets.ANDROID_KEYSTORE }}" | base64 -d > android/studiorvandco_keystore.jks | |
- name: Add key properties | |
run: echo "${{ secrets.ANDROID_KEY_PROPERTIES }}" > android/key.properties | |
- name: Build app | |
run: flutter build apk --release | |
- name: Rename APK | |
run: mv build/app/outputs/flutter-apk/app-release.apk build/app/outputs/flutter-apk/CPM_${{ needs.get_version.outputs.version }}.apk | |
- name: Archive APK | |
uses: actions/upload-artifact@v3 | |
with: | |
name: Android | |
path: build/app/outputs/flutter-apk/CPM_${{ needs.get_version.outputs.version }}.apk | |
build_windows: | |
name: Windows | |
environment: release | |
runs-on: windows-latest | |
needs: [ get_version ] | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
- name: Setup Flutter | |
uses: subosito/flutter-action@v2 | |
with: | |
channel: 'stable' | |
- name: Build app | |
run: flutter build windows --release | |
- run: | | |
ls -l | |
- name: Replace InnoSetup version | |
uses: MathieuSoysal/[email protected] | |
with: | |
file: windows/CPM.iss | |
old-string: 0.1.0 | |
new-string: ${{ needs.get_version.outputs.version }} | |
- name: Run InnoSetup | |
uses: Minionguyjpro/[email protected] | |
with: | |
path: windows/CPM.iss | |
options: /O+ | |
- name: Archive installer | |
uses: actions/upload-artifact@v3 | |
with: | |
name: Windows | |
path: windows\Output\CPM_${{ needs.get_version.outputs.version }}.exe | |
build_publish_web: | |
name: Web | |
environment: release | |
runs-on: ubuntu-latest | |
needs: [ get_version ] | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
- name: Setup Flutter | |
uses: subosito/flutter-action@v2 | |
with: | |
channel: 'stable' | |
- name: Build app | |
run: flutter build web --release | |
- name: Upload to artifacts | |
uses: actions/upload-artifact@v3 | |
with: | |
name: Web | |
path: build/web | |
- name: Publish to Cloudflare Pages | |
uses: cloudflare/pages-action@v1 | |
with: | |
apiToken: ${{ secrets.CLOUDFLARE_API_TOKEN }} | |
accountId: ${{ secrets.CLOUDFLARE_PAGE_ID }} | |
projectName: cpm-rvandco | |
directory: build/web | |
gitHubToken: ${{ secrets.GITHUB_TOKEN }} | |
branch: main | |
wranglerVersion: '3' | |
release: | |
name: Release | |
environment: release | |
runs-on: ubuntu-latest | |
needs: [ build_android, build_windows ] | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
- name: Download all artifacts | |
uses: actions/download-artifact@v3 | |
- name: Create tag | |
uses: rickstaa/action-create-tag@v1 | |
with: | |
tag: "v${{ needs.get_version.outputs.version }}" | |
message: "Cinema Project Manager v${{ needs.get_version.outputs.version }}" | |
- name: Upload to releases | |
uses: ncipollo/release-action@v1 | |
with: | |
artifacts: 'Android/CPM_${{ needs.get_version.outputs.version }}.apk, Windows/CPM_${{ needs.get_version.outputs.version }}.exe, Web/web' | |
token: ${{ secrets.GITHUB_TOKEN }} | |
tag: "v${{ needs.get_version.outputs.version }}" |