-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
a59063d
commit 848e55d
Showing
12 changed files
with
425 additions
and
180 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,116 @@ | ||
| # This is a basic workflow to help you get started with Actions | ||
|
|
||
| name: EOEFANS PRE-BUILD App CI | ||
|
|
||
| # Controls when the workflow will run | ||
| on: | ||
| # Triggers the workflow on push or pull request events but only for the "main" branch | ||
| push: | ||
| branches: [ "main","ci" ] | ||
| # tags: [ "v*" ] | ||
| # pull_request: | ||
| # branches: [ "main","ci" ] | ||
|
|
||
| # Allows you to run this workflow manually from the Actions tab | ||
| workflow_dispatch: | ||
|
|
||
| env: | ||
| KEY_PROPERTIES: ${{ secrets.KEY_PROPERTIES }} | ||
| MY_JKS_FILE: ${{ secrets.MY_JKS_FILE }} | ||
| ACCOUNT_NAME: eoefans01 | ||
| ACCOUNT_KEY: ${{ secrets.STORAGE_ACCOUNT_KEY }} | ||
| SHARE_NAME: eoefans-client-dev # change for dev and prod | ||
| SHARE_NAME_PROD: eoefans-client # change for dev and prod | ||
| SOURCE_DIR: upload-ready | ||
| SOURCE_DIR_PROD: upload-ready-prod | ||
| # IMAGE_TAG: "" #we get tag using the action down below | ||
|
|
||
| # A workflow run is made up of one or more jobs that can run sequentially or in parallel | ||
| jobs: | ||
| # This workflow contains a single job called "build" | ||
| build-and-publish: | ||
| # The type of runner that the job will run on | ||
| runs-on: [ self-hosted, Linux ] | ||
| environment: | ||
| name: "Pre-build" | ||
|
|
||
| # Steps represent a sequence of tasks that will be executed as part of the job | ||
| steps: | ||
| # Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it | ||
| - uses: actions/checkout@v3 | ||
|
|
||
| - name: Get tag | ||
| if: startsWith(github.ref, 'refs/tags/') | ||
| id: tag | ||
| uses: dawidd6/action-get-tag@v1 | ||
| - name: set tag to env | ||
| if: startsWith(github.ref, 'refs/tags/') | ||
| run: | | ||
| echo "IMAGE_TAG=${{steps.tag.outputs.tag}}" >> $GITHUB_ENV | ||
| echo $GITHUB_ENV | ||
| - uses: actions/setup-java@v3 | ||
| with: | ||
| distribution: "zulu" | ||
| java-version: "11" | ||
| cache: 'gradle' | ||
|
|
||
| - name: Setup Android SDK | ||
| uses: android-actions/setup-android@v2 | ||
|
|
||
| - name: Set android sign key for app building | ||
| run: | | ||
| echo "$KEY_PROPERTIES" > android/key.properties | ||
| echo "$MY_JKS_FILE" | base64 --decode > android/upload-keystore.jks | ||
| pwd $$ ls -la | ||
| - uses: subosito/flutter-action@v2 | ||
| with: | ||
| channel: 'stable' # or: 'beta', 'dev' or 'master' | ||
| cache: true | ||
|
|
||
| - run: flutter pub get | ||
| # - run: flutter test | ||
| - run: flutter build apk | ||
| - name: list artifacts | ||
| run: | | ||
| ls -la | ||
| ls -la build/app/outputs/apk/release | ||
| - name: move and rename artifacts | ||
| run: | | ||
| mkdir upload-ready | ||
| cp build/app/outputs/apk/release/* upload-ready | ||
| cd upload-ready && for file in *; do mv "$file" "${{ github.run_number }}-$file"; done && cd .. | ||
| ls -la upload-ready | ||
| - name: upload to azure file for dev environment | ||
| uses: cahaseler/azure-fileshare-upload@v1.0.0 | ||
| with: | ||
| account_name: ${{ env.ACCOUNT_NAME }} | ||
| account_key: ${{ env.ACCOUNT_KEY }} | ||
| share_name: ${{ env.SHARE_NAME }} | ||
| source_dir: ${{ env.SOURCE_DIR }} | ||
|
|
||
|
|
||
|
|
||
| # - name: rename apk | ||
| # if: startsWith(github.ref, 'refs/tags/') | ||
| # run: | | ||
| # mkdir upload-ready-prod | ||
| # mv build/app/outputs/apk/release/app-release.apk upload-ready-prod/EOEFANS-${{ env.IMAGE_TAG }}.apk | ||
|
|
||
| # - name: Publish release | ||
| # uses: softprops/action-gh-release@v1 | ||
| # if: startsWith(github.ref, 'refs/tags/') | ||
| # with: | ||
| # files: upload-ready-prod/EOEFANS-${{ env.IMAGE_TAG }}.apk | ||
|
|
||
| # - name: upload to azure file for prod environment | ||
| # if: startsWith(github.ref, 'refs/tags/') | ||
| # uses: cahaseler/azure-fileshare-upload@v1.0.0 | ||
| # with: | ||
| # account_name: ${{ env.ACCOUNT_NAME }} | ||
| # account_key: ${{ env.ACCOUNT_KEY }} | ||
| # share_name: ${{ env.SHARE_NAME_PROD }} | ||
| # source_dir: ${{ env.SOURCE_DIR_PROD }} |
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,114 @@ | ||
| # This is a basic workflow to help you get started with Actions | ||
|
|
||
| name: EOEFANS PROD-BUILD App CI | ||
|
|
||
| # Controls when the workflow will run | ||
| on: | ||
| # Triggers the workflow on push or pull request events but only for the "main" branch | ||
| push: | ||
| # branches: [ "main","ci" ] | ||
| tags: [ "v*" ] | ||
| # pull_request: | ||
| # branches: [ "main","ci" ] | ||
|
|
||
| # Allows you to run this workflow manually from the Actions tab | ||
| workflow_dispatch: | ||
|
|
||
| env: | ||
| KEY_PROPERTIES: ${{ secrets.KEY_PROPERTIES }} | ||
| ACCOUNT_NAME: eoefans01 | ||
| ACCOUNT_KEY: ${{ secrets.STORAGE_ACCOUNT_KEY }} | ||
| SHARE_NAME: eoefans-client-dev # change for dev and prod | ||
| SHARE_NAME_PROD: eoefans-client # change for dev and prod | ||
| SOURCE_DIR: upload-ready | ||
| SOURCE_DIR_PROD: upload-ready-prod | ||
| # IMAGE_TAG: "" #we get tag using the action down below | ||
|
|
||
| # A workflow run is made up of one or more jobs that can run sequentially or in parallel | ||
| jobs: | ||
| # This workflow contains a single job called "build" | ||
| build-and-publish: | ||
| # The type of runner that the job will run on | ||
| runs-on: [ self-hosted, Linux ] | ||
| environment: | ||
| name: "Prod-build" | ||
|
|
||
| # Steps represent a sequence of tasks that will be executed as part of the job | ||
| steps: | ||
| # Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it | ||
| - uses: actions/checkout@v3 | ||
|
|
||
| - name: Get tag | ||
| if: startsWith(github.ref, 'refs/tags/') | ||
| id: tag | ||
| uses: dawidd6/action-get-tag@v1 | ||
| - name: set tag to env | ||
| if: startsWith(github.ref, 'refs/tags/') | ||
| run: | | ||
| echo "IMAGE_TAG=${{steps.tag.outputs.tag}}" >> $GITHUB_ENV | ||
| echo $GITHUB_ENV | ||
| - uses: actions/setup-java@v3 | ||
| with: | ||
| distribution: "zulu" | ||
| java-version: "11" | ||
| cache: 'gradle' | ||
|
|
||
| - name: Setup Android SDK | ||
| uses: android-actions/setup-android@v2 | ||
|
|
||
| - name: Set android sign key for app building | ||
| run: | | ||
| echo "$KEY_PROPERTIES" > android/key.properties | ||
| pwd $$ ls -la | ||
| - uses: subosito/flutter-action@v2 | ||
| with: | ||
| channel: 'stable' # or: 'beta', 'dev' or 'master' | ||
| cache: true | ||
|
|
||
| - run: flutter pub get | ||
| # - run: flutter test | ||
| - run: flutter build apk | ||
| - name: list artifacts | ||
| run: | | ||
| ls -la | ||
| ls -la build/app/outputs/apk/release | ||
| - name: move and rename artifacts | ||
| run: | | ||
| mkdir upload-ready | ||
| cp build/app/outputs/apk/release/* upload-ready | ||
| cd upload-ready && for file in *; do mv "$file" "${{ github.run_number }}-$file"; done && cd .. | ||
| ls -la upload-ready | ||
| - name: upload to azure file for dev environment | ||
| uses: cahaseler/azure-fileshare-upload@v1.0.0 | ||
| with: | ||
| account_name: ${{ env.ACCOUNT_NAME }} | ||
| account_key: ${{ env.ACCOUNT_KEY }} | ||
| share_name: ${{ env.SHARE_NAME }} | ||
| source_dir: ${{ env.SOURCE_DIR }} | ||
|
|
||
|
|
||
|
|
||
| - name: rename apk | ||
| if: startsWith(github.ref, 'refs/tags/') | ||
| run: | | ||
| mkdir upload-ready-prod | ||
| mv build/app/outputs/apk/release/app-release.apk upload-ready-prod/EOEFANS-${{ env.IMAGE_TAG }}.apk | ||
| - name: Publish release | ||
| uses: softprops/action-gh-release@v1 | ||
| if: startsWith(github.ref, 'refs/tags/') | ||
| with: | ||
| files: upload-ready-prod/EOEFANS-${{ env.IMAGE_TAG }}.apk | ||
|
|
||
| - name: upload to azure file for prod environment | ||
| if: startsWith(github.ref, 'refs/tags/') | ||
| uses: cahaseler/azure-fileshare-upload@v1.0.0 | ||
| with: | ||
| account_name: ${{ env.ACCOUNT_NAME }} | ||
| account_key: ${{ env.ACCOUNT_KEY }} | ||
| share_name: ${{ env.SHARE_NAME_PROD }} | ||
| source_dir: ${{ env.SOURCE_DIR_PROD }} |
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,4 +1,4 @@ | ||
| # eoe_fans | ||
| # EOEFANS | ||
|
|
||
| A new Flutter project. | ||
|
|
||
|
|
||
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
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,4 @@ | ||
| storePassword=123abc456d | ||
| keyPassword=123abc456d | ||
| keyAlias=upload | ||
| storeFile=/runner/_work/eoefans-mobile-flutter/eoefans-mobile-flutter/android/upload-keystore.jks |
Oops, something went wrong.