Skip to content

Commit

Permalink
💚 fix build workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
techouse committed May 22, 2023
1 parent b4caa38 commit a038002
Showing 1 changed file with 4 additions and 37 deletions.
41 changes: 4 additions & 37 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,44 +12,7 @@ env:
permissions: read-all

jobs:
analyze:
name: "Analyze"
runs-on: macos-latest
steps:
- uses: dart-lang/setup-dart@v1
with:
sdk: stable
- id: checkout
uses: actions/checkout@v3
- name: Install dependencies
run: dart pub get
- name: Configure .env file
id: generate_env_file
env:
ALGOLIA_SEARCH_INDEX: ${{ vars.ALGOLIA_SEARCH_INDEX }}
ALGOLIA_APPLICATION_ID: ${{ vars.ALGOLIA_APPLICATION_ID }}
ALGOLIA_SEARCH_ONLY_API_KEY: ${{ vars.ALGOLIA_SEARCH_ONLY_API_KEY }}
run: |
set -e
mv .env.example .env
sed -i '' "s#APP_VERSION=.*#APP_VERSION=$VERSION#" .env
sed -i '' "s#GITHUB_REPOSITORY_URL=.*#GITHUB_REPOSITORY_URL=$GITHUB_REPOSITORY_URL#" .env
sed -i '' "s#ALGOLIA_SEARCH_INDEX=.*#ALGOLIA_SEARCH_INDEX=$ALGOLIA_SEARCH_INDEX#" .env
sed -i '' "s#ALGOLIA_APPLICATION_ID=.*#ALGOLIA_APPLICATION_ID=$ALGOLIA_APPLICATION_ID#" .env
sed -i '' "s#ALGOLIA_SEARCH_ONLY_API_KEY=.*#ALGOLIA_SEARCH_ONLY_API_KEY=$ALGOLIA_SEARCH_ONLY_API_KEY#" .env
- name: Generate code
run: dart run build_runner build --delete-conflicting-outputs
- name: Check formatting
run: dart format --output=none --set-exit-if-changed .
- name: Analyze
run: dart analyze --fatal-infos
- name: Clean up
id: clean_up
if: ${{ always() }}
run: |
rm .env
publish:
needs: analyze
name: "Build"
runs-on: macos-latest
environment: build
Expand Down Expand Up @@ -104,6 +67,10 @@ jobs:
- name: Run Dart code generation
id: generate_code
run: dart run build_runner build --delete-conflicting-outputs
- name: Check formatting
run: dart format --output=none --set-exit-if-changed .
- name: Analyze
run: dart analyze --fatal-infos
- name: Build executable
id: build_executable
run: bash ./build.sh
Expand Down

0 comments on commit a038002

Please sign in to comment.