Skip to content

Commit

Permalink
fix: updated ENV
Browse files Browse the repository at this point in the history
  • Loading branch information
shoriwe committed Oct 11, 2023
1 parent 8acdeae commit 56f49e3
Showing 1 changed file with 68 additions and 68 deletions.
136 changes: 68 additions & 68 deletions .github/workflows/release.yaml
Original file line number Diff line number Diff line change
@@ -1,69 +1,69 @@
name: Release

on:
push:
branches: ["main"]

jobs:
versioning:
runs-on: ubuntu-latest
outputs:
version: ${{ steps.latest_version.outputs.version }}
steps:
- uses: actions/checkout@v3
- id: latest_version
name: Latest version
run: python version.py >> $GITHUB_OUTPUT

create-release:
runs-on: ubuntu-latest
permissions:
contents: write
packages: write
needs:
- versioning
outputs:
upload_url: ${{ steps.create-release.outputs.upload_url }}
steps:
- name: Create Release
id: create-release
uses: actions/create-release@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
tag_name: ${{ needs.versioning.outputs.version }}
release_name: Release ${{ needs.versioning.outputs.version }}
draft: false
prerelease: false

build-release:
runs-on: ubuntu-latest
permissions:
contents: write
packages: write
needs:
- create-release
steps:
- uses: actions/checkout@v3
- uses: actions/setup-java@v2
with:
distribution: 'zulu'
java-version: '11'
- uses: subosito/flutter-action@v2
with:
flutter-version: '3.x'
- name: Download dependencies
run: flutter pub get
- name: Create .env with server URL
run: echo "API_LOGIN_URL = ${{ secrets.API_LOGIN_URL }}" > .env
- name: Build apk
run: flutter build apk --release
- name: Upload Binary to Release
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ needs.create-release.outputs.upload_url }}
asset_path: ./build/app/outputs/flutter-apk/app-release.apk
asset_name: android.apk
name: Release

on:
push:
branches: ["main"]

jobs:
versioning:
runs-on: ubuntu-latest
outputs:
version: ${{ steps.latest_version.outputs.version }}
steps:
- uses: actions/checkout@v3
- id: latest_version
name: Latest version
run: python version.py >> $GITHUB_OUTPUT

create-release:
runs-on: ubuntu-latest
permissions:
contents: write
packages: write
needs:
- versioning
outputs:
upload_url: ${{ steps.create-release.outputs.upload_url }}
steps:
- name: Create Release
id: create-release
uses: actions/create-release@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
tag_name: ${{ needs.versioning.outputs.version }}
release_name: Release ${{ needs.versioning.outputs.version }}
draft: false
prerelease: false

build-release:
runs-on: ubuntu-latest
permissions:
contents: write
packages: write
needs:
- create-release
steps:
- uses: actions/checkout@v3
- uses: actions/setup-java@v2
with:
distribution: 'zulu'
java-version: '11'
- uses: subosito/flutter-action@v2
with:
flutter-version: '3.x'
- name: Download dependencies
run: flutter pub get
- name: Create .env with server URL
run: echo "API_URL = ${{ secrets.API_URL }}" > .env
- name: Build apk
run: flutter build apk --release
- name: Upload Binary to Release
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ needs.create-release.outputs.upload_url }}
asset_path: ./build/app/outputs/flutter-apk/app-release.apk
asset_name: android.apk
asset_content_type: application/octet-stream

0 comments on commit 56f49e3

Please sign in to comment.