Merge pull request #1008 from CodeForAfrica/ft/climatemapped-remove-u… #406
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 | PROD | |
on: | |
push: | |
branches: ["main"] | |
# This allows a subsequently queued workflow run to interrupt previous runs | |
concurrency: | |
group: "${{ github.workflow }} @ ${{ github.ref }}" | |
cancel-in-progress: true | |
jobs: | |
build: | |
name: Release | |
runs-on: ${{ matrix.os }} | |
strategy: | |
matrix: | |
node-version: [20.16] | |
os: [ubuntu-latest] | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
with: | |
fetch-depth: 2 | |
# https://github.com/pnpm/action-setup#use-cache-to-reduce-installation-time | |
- name: Install pnpm | |
uses: pnpm/action-setup@v4 | |
id: pnpm-install | |
with: | |
run_install: false | |
- name: Get pnpm store directory | |
id: pnpm-cache | |
shell: bash | |
run: | | |
echo "STORE_PATH=$(pnpm store path)" >> $GITHUB_OUTPUT | |
- name: Setup pnpm cache | |
uses: actions/cache@v4 | |
with: | |
path: ${{ steps.pnpm-cache.outputs.STORE_PATH }} | |
key: ${{ runner.os }}-pnpm-store-${{ hashFiles('**/pnpm-lock.yaml') }} | |
restore-keys: | | |
${{ runner.os }}-pnpm-store- | |
# Looks like to use pnpm cache, setup-node must run after pnpm/action-setup | |
# https://github.com/actions/setup-node/blob/main/docs/advanced-usage.md#caching-packages-data | |
- name: Install Node.js | |
uses: actions/setup-node@v4 | |
with: | |
node-version: ${{ matrix.node-version }} | |
cache: "pnpm" | |
- name: Confirm pnpm version | |
run: pnpm --version | |
- name: Install dependencies | |
run: pnpm install | |
- name: Create Release Pull Request | |
uses: changesets/action@v1 | |
with: | |
version: pnpm bump | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |