Skip to content

.github/workflows/build.yml #10

.github/workflows/build.yml

.github/workflows/build.yml #10

Workflow file for this run

on: [workflow_dispatch]
jobs:
build:
runs-on: ubuntu-latest
name: Build the project
steps:
- name: Checkout
uses: actions/checkout@v4
# Run your project's build step
# - name: Build
# run: npm install && npm run build
- name: Set up node
# ADD YOUR CUSTOM DEPENDENCY UPGRADE COMMANDS BELOW
uses: actions/setup-node@v3
with:
node-version: "20"
- name: Install JS dependencies and build
# ADD YOUR CUSTOM DEPENDENCY UPGRADE COMMANDS BELOW
run: |
npm ci && npm run build && npm run sync
env:
VITE_POLICY_KEY: ${{ secrets.VITE_POLICY_KEY }}
VITE_BC_ACCOUNT_ID: ${{ secrets.VITE_BC_ACCOUNT_ID }}
- name: Load secret
uses: 1password/load-secrets-action@v1
with:
# Export loaded secrets as environment variables
export-env: true
env:
OP_SERVICE_ACCOUNT_TOKEN: ${{ secrets.OP_SERVICE_ACCOUNT_TOKEN }}
AWS_KEY_ID: "op://DevOps/cloudflare-r2-token/access-key-id"
AWS_SECRET_ACCESS_KEY: "op://DevOps/cloudflare-r2-token/secret-access-key"
ENDPOINT: "op://DevOps/cloudflare-r2-token/endpoint"
- name: Get current date
id: date
run: echo "date=$(date +'%Y-%m-%d')" >> "$GITHUB_OUTPUT"
- name: zip the built folder
run: mkdir ./dottmp && zip -r ./dottmp/${{steps.date.outputs.date}}-dotapp ./ios
- name: Upload IOS to R2
uses: shallwefootball/s3-upload-action@master
with:
aws_key_id: ${{ env.AWS_KEY_ID }}
aws_secret_access_key: ${{ env.AWS_SECRET_ACCESS_KEY}}
aws_bucket: dot-mobile
source_dir: "./dottmp"
destination_dir: "ios"
endpoint: ${{ env.ENDPOINT }}