Upgrades upload-artifact as pipeline is failing #14
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: Deploy to native platforms | |
on: | |
push: | |
tags: | |
- v* | |
workflow_dispatch: | |
inputs: | |
tag: | |
description: 'Tag in the format of refs/tags/v1.1.1+3' | |
required: true | |
type: string | |
jobs: | |
web-android: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout from git | |
uses: actions/[email protected] | |
- name: Gets Flutter | |
uses: subosito/flutter-action@v2 | |
with: | |
flutter-version: '3.24.3' | |
channel: 'stable' | |
- name: Downloads packages | |
run: flutter pub get | |
# Version tags will be e.g., "refs/tags/v1.1.1+3" before processing | |
- name: Gets version from tag | |
id: get_version | |
run: echo ::set-output name=VERSION::$(echo $GITHUB_REF | cut -c 12-) | |
- name: Embeds version into pubspec.yaml | |
uses: jacobtomlinson/gha-find-replace@v2 | |
with: | |
find: "0.0.0+0" | |
replace: ${{ steps.get_version.outputs.VERSION }} | |
regex: false | |
include: "pubspec.yaml" | |
- uses: actions/upload-artifact@v3 | |
with: | |
name: versioned-pubspec-web-android | |
path: pubspec.yaml | |
- name: Creates key.properties from secrets | |
run: cd android && echo "${{ secrets.PLAY_KEY_PROPERTIES }}" > key.properties && cd .. | |
- name: Creates upload-keystore.jks from secrets | |
run: cd android/app && echo "${{ secrets.PLAY_UPLOAD_KEYSTORE }}" | base64 --decode > upload-keystore.jks && cd ../.. | |
- name: Gets Java | |
uses: actions/setup-java@v2 | |
with: | |
distribution: 'zulu' | |
java-version: '11' | |
- name: Builds Android | |
run: flutter build appbundle | |
- uses: actions/upload-artifact@v3 | |
with: | |
name: android-release | |
path: build/app/outputs/bundle/release/app-release.aab | |
- name: Publishes Android to Google Play | |
uses: r0adkll/upload-google-play@v1 | |
with: | |
serviceAccountJsonPlainText: ${{ secrets.PLAY_SERVICE_ACCOUNT_JSON }} | |
packageName: janjanxyz.kotobaten | |
releaseFile: "build/app/outputs/bundle/release/app-release.aab" | |
track: production | |
inAppUpdatePriority: 2 | |
status: completed # https://github.com/r0adkll/upload-google-play/issues/85 | |
windows: | |
runs-on: windows-latest | |
steps: | |
- name: Checkout from git | |
uses: actions/[email protected] | |
- name: Gets Flutter | |
uses: subosito/flutter-action@v2 | |
with: | |
flutter-version: '3.24.3' | |
channel: 'stable' | |
- name: Downloads packages | |
run: flutter pub get | |
# Version tags will be e.g., "refs/tags/v1.1.1+3" before processing | |
- name: Gets version from tag | |
id: get_version | |
run: echo ::set-output name=VERSION::$(echo $GITHUB_REF | cut -c 12-) | |
- name: Embeds version into pubspec.yaml | |
shell: pwsh | |
run: | | |
(Get-Content -path pubspec.yaml -Raw).replace("0.0.0+0","${{ steps.get_version.outputs.VERSION }}").replace("0.0.0.0",[regex]::Match("${{ steps.get_version.outputs.VERSION }}", "^(?<version>[^\+]*)\+").groups["version"].value) | Set-Content -Path pubspec.yaml | |
- uses: actions/upload-artifact@v3 | |
with: | |
name: versioned-pubspec-windows | |
path: pubspec.yaml | |
- name: Builds Windows | |
run: flutter pub run msix:create | |
- name: Publish to Dev Center | |
uses: isaacrlevin/[email protected] | |
with: | |
tenant-id: ${{ secrets.AZURE_AD_TENANT_ID }} | |
client-id: ${{ secrets.AZURE_AD_APPLICATION_CLIENT_ID }} | |
client-secret: ${{ secrets.AZURE_AD_APPLICATION_SECRET }} | |
app-id: ${{ secrets.STORE_APP_ID }} | |
package-path: "build\\windows\\runner\\Release" |