Update client #412
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: 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@v4 | |
- name: Cache the node_modules dir | |
uses: actions/cache@v4 | |
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 "[email protected]" | |
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 }} |