Skip to content

Update client

Update client #228

Workflow file for this run

name: Update client
on:
workflow_dispatch:
jobs:
update-client:
runs-on: ubuntu-latest
outputs:
ref: ${{ steps.update-client.outputs.ref }}
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Cache the node_modules dir
uses: actions/cache@v3
with:
path: node_modules
key: ${{ runner.os }}-node_modules-${{ hashFiles('yarn.lock') }}
- name: Install
run: yarn install --immutable
- name: Update client
id: update-client
run: |
git config --global user.name "Hypothesis GitHub Actions"
git config --global user.email "hypothesis@users.noreply.github.com"
tools/update-client
echo "ref=$(git rev-parse HEAD)" >> $GITHUB_OUTPUT
# Release a new version of the extension with the updated client.
#
# Pushes to the main branch normally trigger this workflow automatically,
# but the push by the update-client job doesn't due to GitHub Actions restrictions.
# See https://docs.github.com/en/actions/using-workflows/triggering-a-workflow#triggering-a-workflow-from-a-workflow.
release:
needs: update-client
uses: ./.github/workflows/release.yml
name: Release extension
secrets: inherit
with:
ref: ${{ needs.update-client.outputs.ref }}