Update version to 1.0.1-488 #737
Workflow file for this run
This file contains hidden or 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
| name: Build and Deploy Web | |
| # This workflow is run when any tag is published | |
| on: | |
| push: | |
| tags: | |
| - '*' | |
| jobs: | |
| build: | |
| if: github.actor == 'OSBotify' | |
| runs-on: ubuntu-16.04 | |
| steps: | |
| - uses: actions/checkout@v2 | |
| # Installs node | |
| - name: Setup Node | |
| uses: actions/setup-node@v1 | |
| with: | |
| node-version: '14.x' | |
| # Install python pre-reqs | |
| - name: Setup python | |
| run: sudo apt-get install python3-setuptools | |
| # Installs Cloudflare CLI, after installing/upgrading dependencies | |
| - name: Setup Cloudflare CLI | |
| run: | | |
| # Pip 21 doesn't support python 3.5, so use the version before it | |
| sudo python3 -m pip install --upgrade pip==20.3.4 | |
| pip3 install wheel # need wheel before cloudflare, this is the only way to ensure order. | |
| pip3 install cloudflare | |
| - name: Configure AWS Credentials | |
| # Version: 1.5.5 | |
| uses: aws-actions/configure-aws-credentials@e97d7fbc8e0e5af69631c13daa0f4b5a8d88165b | |
| with: | |
| aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID }} | |
| aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }} | |
| aws-region: us-east-1 | |
| - name: Install dependenices | |
| run: npm ci | |
| - name: Build web | |
| run: npm run build | |
| - name: Deploy production to S3 | |
| run: aws s3 cp --recursive --acl public-read $GITHUB_WORKSPACE/dist s3://expensify-cash/ | |
| - name: Deploy staging to S3 | |
| run: aws s3 cp --recursive --acl public-read $GITHUB_WORKSPACE/dist s3://staging-expensify-cash/ | |
| - name: Purge production Cloudflare cache | |
| run: /home/runner/.local/bin/cli4 --delete hosts=["expensify.cash"] /zones/:357b42c0989e3bed82f6d6400e8b9d66/purge_cache | |
| env: | |
| CF_API_KEY: ${{ secrets.CLOUDFLARE_TOKEN }} | |
| - name: Purge staging Cloudflare cache | |
| run: /home/runner/.local/bin/cli4 --delete hosts=["staging.expensify.cash"] /zones/:357b42c0989e3bed82f6d6400e8b9d66/purge_cache | |
| env: | |
| CF_API_KEY: ${{ secrets.CLOUDFLARE_TOKEN }} | |
| # These Slack steps are duplicated in all workflows, if you make a change to this step, make sure to update all | |
| # the other workflows with the same changes | |
| - uses: 8398a7/action-slack@v3 | |
| name: Job failed Slack notification | |
| if: ${{ failure() }} | |
| with: | |
| status: custom | |
| fields: workflow, repo | |
| custom_payload: | | |
| { | |
| channel: '#announce', | |
| attachments: [{ | |
| color: "#DB4545", | |
| pretext: `<!here>`, | |
| text: `💥 ${process.env.AS_REPO} failed on ${process.env.AS_WORKFLOW} workflow 💥`, | |
| }] | |
| } | |
| env: | |
| GITHUB_TOKEN: ${{ github.token }} | |
| SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK }} | |
| - name: Set version in ENV | |
| if: ${{ success() }} | |
| run: echo "VERSION=$(npm run print-version --silent)" >> $GITHUB_ENV | |
| - uses: 8398a7/action-slack@v3 | |
| name: QA Slack notification | |
| if: ${{ success() }} | |
| with: | |
| status: custom | |
| fields: workflow, repo | |
| custom_payload: | | |
| { | |
| channel: '#qa', | |
| attachments: [{ | |
| color: "#39AA56", | |
| text: `*Expensify Chat :expensifychat:* ${process.env.AS_WORKFLOW} version *${{ env.VERSION }}* was deployed, please start *regression testing*: https://git.io/JUb0r`, | |
| }] | |
| } | |
| env: | |
| GITHUB_TOKEN: ${{ github.token }} | |
| SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK }} |