Skip to content

Commit

Permalink
Merge pull request #16 from mahdikhashan/fix-ci-issue
Browse files Browse the repository at this point in the history
ci: replace job level env with workflow level and use env prefix for …
  • Loading branch information
mahdikhashan authored Dec 25, 2023
2 parents 3961691 + 8f7dbe1 commit c37b212
Showing 1 changed file with 8 additions and 8 deletions.
16 changes: 8 additions & 8 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,14 +8,14 @@ on:
required: true
default: '0.1'

env:
APP_NAME: 'Bouddica'

jobs:
build:
name: Build Signed APK
runs-on: ubuntu-latest

env:
APP_NAME: 'Bouddica'

steps:
- uses: actions/checkout@v3
- name: Set up JDK 17
Expand Down Expand Up @@ -55,16 +55,16 @@ jobs:
# Show information about the APK's signing certificates
- name: Verify Signature
run: |
APK_PATH="app/build/outputs/apk/release/${APP_NAME}_${{ github.event.inputs.version }}.apk"
APK_PATH="app/build/outputs/apk/release/${{ env.APP_NAME }}_${{ github.event.inputs.version }}.apk"
echo "Verifying APK at path: $APK_PATH"
$ANDROID_SDK_ROOT/build-tools/33.0.1/apksigner verify --print-certs "$APK_PATH"
# Save the APK after the Build job is complete to publish it as a Github release in the next job
- name: Upload APK
uses: actions/[email protected]
with:
name: "${APP_NAME}"
path: "app/build/outputs/apk/release/${APP_NAME}_${{ github.event.inputs.version }}.apk"
name: "${{ env.APP_NAME }}"
path: "app/build/outputs/apk/release/${{ env.APP_NAME }}_${{ github.event.inputs.version }}.apk"

release:
name: Release APK
Expand All @@ -75,7 +75,7 @@ jobs:
- name: Download APK from build
uses: actions/download-artifact@v1
with:
name: "${APP_NAME}"
name: "${{ env.APP_NAME }}"

- name: Create Release
id: create_release
Expand All @@ -87,4 +87,4 @@ jobs:
name: "Release v${{ github.event.inputs.version }}"
draft: false
prerelease: false
files: "${APP_NAME}/${APP_NAME}_${{ github.event.inputs.version }}.apk"
files: "${{ env.APP_NAME }}/${{ env.APP_NAME }}_${{ github.event.inputs.version }}.apk"

0 comments on commit c37b212

Please sign in to comment.