Merge pull request #383 from samternent/changeset-release/main #8
Workflow file for this run
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
name: Release ternentdotdev | |
env: | |
VERCEL_ORG_ID: ${{ secrets.VERCEL_ORG_ID }} | |
VERCEL_PROJECT_ID: ${{ secrets.VERCEL_TERNENTDOTDEV_PROJECT_ID }} | |
PNPM_CACHE_PATH: ~/.pnpm-store | |
PNPM_CACHE_NAME: pnpm-store-cache | |
on: | |
push: | |
tags: | |
- "ternentdotdev-[0-9]+.[0-9]+.[0-9]+" | |
jobs: | |
Deploy-Production: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Checkout repo | |
uses: actions/checkout@master | |
with: | |
fetch-depth: 0 | |
persist-credentials: false | |
- name: Get branch name | |
id: branch | |
run: | | |
echo "branch_name=$(echo ${GITHUB_REF#refs/heads/} | tr / -)" >> $GITHUB_ENV | |
- name: Get node version | |
id: nvmrc | |
run: echo ::set-output name=NODE_VERSION::$(cat .nvmrc) | |
- name: Setup PNPM | |
uses: pnpm/action-setup@v2 | |
with: | |
version: 8 | |
- name: Install | |
run: curl https://rustwasm.github.io/wasm-pack/installer/init.sh -sSf | sh | |
- name: Build rust libs | |
run: cd packages/blockchain && pnpm build && cd ../.. | |
- name: Install Vercel CLI | |
run: pnpm install --global vercel@latest | |
- name: Install dependencies | |
run: pnpm install --frozen-lockfile | |
- name: Build libs | |
run: pnpm build:libs | |
- name: Link Vercel project | |
run: vercel link --yes --cwd ${{ github.workspace }}/apps/ternentdotdev --token=${{ secrets.VERCEL_TOKEN }} | |
- name: Pull Vercel Environment Information | |
run: vercel pull --yes --environment=production --cwd ${{ github.workspace }}/apps/ternentdotdev --token=${{ secrets.VERCEL_TOKEN }} | |
- name: Link Vercel project to root | |
run: cp -r ${{ github.workspace }}/apps/ternentdotdev/.vercel ${{ github.workspace }}/ | |
- name: Build Vercel Environment Information | |
run: vercel build --prod --token=${{ secrets.VERCEL_TOKEN }} | |
- name: Build slides | |
run: pnpm build:slides | |
- name: Deploy Project Artifacts to Vercel | |
run: vercel deploy --prebuilt --prod --token=${{ secrets.VERCEL_TOKEN }} | |
- name: Update app version in Redis | |
run: node .ops/update-redis-version.mjs | |
env: | |
REDIS_PASSWORD: ${{ secrets.REDIS_PASSWORD }} | |
REDIS_ENDPOINT_URI: ${{ secrets.REDIS_ENDPOINT_URI }} |