name: Old Release Workflow on: push: branches: - master-unused concurrency: group: release_workflow cancel-in-progress: true jobs: build_staging: runs-on: ubuntu-latest environment: staging steps: - uses: actions/checkout@v2 - run: cat .github/workflows/versions.env >> $GITHUB_ENV - run: echo "$WEB_APP_ENV" > .env - name: Set up Flutter uses: subosito/flutter-action@v2 with: flutter-version: ${{ env.FLUTTER_VERSION }} - name: Prepare web run: ./scripts/prepare-web.sh - name: Build web run: ./scripts/build-web.sh - name: Upload artifacts uses: actions/upload-artifact@v2 with: name: web-artifact path: ./build/web upload_sentry: runs-on: ubuntu-latest needs: build_staging steps: - uses: actions/checkout@v2 - run: cat .github/workflows/versions.env >> $GITHUB_ENV - run: echo "$WEB_APP_ENV" > .env - name: Build web run: ./scripts/upload-sentry.sh deploy_staging: runs-on: ubuntu-latest needs: build_staging steps: - uses: actions/checkout@v2 - run: cat .github/workflows/versions.env >> $GITHUB_ENV - run: echo "$WEB_APP_ENV" > .env - name: Set up AWS CLI uses: aws-actions/configure-aws-credentials@v2 with: aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID }} aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }} aws-region: ${{ secrets.AWS_DEFAULT_REGION }} - name: Download all workflow run artifacts uses: actions/download-artifact@v3 build_production: runs-on: ubuntu-latest environment: production steps: - uses: actions/checkout@v2 - run: cat .github/workflows/versions.env >> $GITHUB_ENV - run: echo "$WEB_APP_ENV" > .env - name: Set up Flutter uses: subosito/flutter-action@v2 with: flutter-version: ${{ env.FLUTTER_VERSION }} - name: Prepare web run: ./scripts/prepare-web.sh - name: Build web run: ./scripts/build-web.sh - name: Upload artifacts uses: actions/upload-artifact@v2 with: name: web-artifact path: ./build/web deploy_production: environment: production runs-on: ubuntu-latest needs: build_production steps: - uses: actions/checkout@v2 - run: cat .github/workflows/versions.env >> $GITHUB_ENV - run: echo "$WEB_APP_ENV" > .env - name: Download all workflow run artifacts uses: actions/download-artifact@v3 - name: Set up AWS CLI uses: aws-actions/configure-aws-credentials@v2 with: aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID }} aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }} aws-region: ${{ secrets.AWS_DEFAULT_REGION }}