-
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
877e54e
commit 15086c5
Showing
2 changed files
with
65 additions
and
65 deletions.
There are no files selected for viewing
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,73 +1,74 @@ | ||
# name: "Build & Release" | ||
# on: | ||
# pull_request: | ||
# branches: | ||
# - main | ||
# - master | ||
# push: | ||
# branches: | ||
# - main | ||
# - master | ||
name: "Build & Release" | ||
on: | ||
pull_request: | ||
branches: | ||
- main | ||
- master | ||
push: | ||
branches: | ||
- main | ||
- master | ||
|
||
# permissions: | ||
# contents: write | ||
permissions: | ||
contents: write | ||
|
||
# jobs: | ||
# build: | ||
# name: Build & Release | ||
# runs-on: macos-latest | ||
# env: | ||
# API_KEY: ${{ secrets.API_KEY }} | ||
# CONTEXT_KEY: ${{ secrets.CONTEXT_KEY }} | ||
jobs: | ||
build: | ||
name: Build & Release | ||
runs-on: macos-latest | ||
env: | ||
API_KEY: ${{ secrets.API_KEY }} | ||
CONTEXT_KEY: ${{ secrets.CONTEXT_KEY }} | ||
|
||
# steps: | ||
# - uses: actions/checkout@v4 | ||
# with: | ||
# token: ${{ secrets.GITHUB_TOKEN }} | ||
# fetch-depth: 0 | ||
steps: | ||
- uses: actions/checkout@v4 | ||
with: | ||
token: ${{ secrets.GITHUB_TOKEN }} | ||
fetch-depth: 0 | ||
|
||
# - name: Set up Java 17 | ||
# uses: actions/setup-java@v2 | ||
# with: | ||
# java-version: "17.x" | ||
# java-package: jdk | ||
# architecture: x64 | ||
# check-latest: false | ||
# server-id: github | ||
# server-username: ${{ github.actor }} | ||
# server-password: ${{ secrets.GITHUB_TOKEN }} | ||
# overwrite-settings: true | ||
# job-status: success | ||
# distribution: "temurin" | ||
- name: Set up Java 17 | ||
uses: actions/setup-java@v2 | ||
with: | ||
java-version: "17.x" | ||
java-package: jdk | ||
architecture: x64 | ||
check-latest: false | ||
server-id: github | ||
server-username: ${{ github.actor }} | ||
server-password: ${{ secrets.GITHUB_TOKEN }} | ||
overwrite-settings: true | ||
job-status: success | ||
distribution: "temurin" | ||
|
||
# - name: Create env file | ||
# run: | | ||
# mkdir -p config | ||
# echo "API_KEY=$API_KEY" > config/api_keys.env | ||
# echo "CONTEXT_KEY=$CONTEXT_KEY" >> config/api_keys.env | ||
- name: Create env file | ||
run: | | ||
cat > lib/config/api_keys.env << EOL | ||
API_KEY=${{ secrets.API_KEY }} | ||
CONTEXT_KEY=${{ secrets.CONTEXT_KEY }} | ||
EOL | ||
# - name: Set up Flutter | ||
# uses: subosito/flutter-action@v2 | ||
# with: | ||
# channel: "stable" | ||
# architecture: x64 | ||
- name: Set up Flutter | ||
uses: subosito/flutter-action@v2 | ||
with: | ||
channel: "stable" | ||
architecture: x64 | ||
|
||
# - name: build apk | ||
# run: flutter build apk --release --split-per-abi | ||
- name: build apk | ||
run: flutter build apk --release --split-per-abi | ||
|
||
# - name: build ios | ||
# run: | | ||
# flutter build ios --no-codesign | ||
# cd build/ios/iphoneos | ||
# mkdir Payload | ||
# cd Payload | ||
# ln -s ../Runner.app | ||
# cd .. | ||
# zip -r app.ipa Payload | ||
- name: build ios | ||
run: | | ||
flutter build ios --no-codesign | ||
cd build/ios/iphoneos | ||
mkdir Payload | ||
cd Payload | ||
ln -s ../Runner.app | ||
cd .. | ||
zip -r app.ipa Payload | ||
# - name: Push to Releases | ||
# uses: ncipollo/release-action@v1 | ||
# with: | ||
# artifacts: "build/app/outputs/apk/release/*,build/ios/iphoneos/app.ipa" | ||
# tag: v1.0.${{ github.run_number }} | ||
# token: ${{ secrets.GITHUB_TOKEN }} | ||
- name: Push to Releases | ||
uses: ncipollo/release-action@v1 | ||
with: | ||
artifacts: "build/app/outputs/apk/release/*,build/ios/iphoneos/app.ipa" | ||
tag: v1.0.${{ github.run_number }} | ||
token: ${{ secrets.GITHUB_TOKEN }} |
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