chore(deps-dev): bump @types/jasmine from 4.3.5 to 4.3.6 #1839
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: Build | |
on: | |
push: | |
branches: [main] | |
pull_request: | |
branches: [main] | |
jobs: | |
build_test_publish: | |
name: Build, test and publish | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v3 | |
- name: Set environment variables | |
run: | | |
GH_COMMIT_MESSAGE="$(head -n 1 <<< "${{github.event.head_commit.message}}")" | |
GIT_COMMIT_MESSAGE="$(git log --format=%B -n 1 ${{github.event.after}} | head -n 1)" | |
echo "COMMIT_MESSAGE=\"$(test "${GH_COMMIT_MESSAGE}" && echo "${GH_COMMIT_MESSAGE}" || echo "${GIT_COMMIT_MESSAGE}")\"" >> $GITHUB_ENV | |
echo "PR_TITLE=\"${{github.event.pull_request.title}}\"" >> $GITHUB_ENV | |
cat "${GITHUB_ENV}" | |
- name: Set up Node.js | |
uses: actions/setup-node@v3 | |
with: | |
node-version: 18.x | |
- name: Set yarn cache directory | |
id: yarn-cache-dir-path | |
run: echo "::set-output name=dir::$(yarn cache dir)" | |
- name: Get yarn cache | |
uses: actions/cache@v3 | |
id: yarn-cache | |
with: | |
path: ${{steps.yarn-cache-dir-path.outputs.dir}} | |
key: ${{runner.os}}-yarn-${{hashFiles('**/yarn.lock')}} | |
restore-keys: ${{runner.os}}-yarn- | |
- name: Build, lint and test | |
run: | | |
yarn | |
yarn boot | |
yarn lint | |
yarn dist | |
yarn test | |
- name: Release | |
if: | | |
github.event_name != 'pull_request' && | |
!startsWith(env.COMMIT_MESSAGE || env.PR_TITLE, '"chore') | |
env: | |
GIT_AUTHOR_NAME: ffflobot | |
GIT_AUTHOR_EMAIL: ffflobot@users.noreply.github.com | |
GIT_COMMITTER_NAME: ffflobot | |
GIT_COMMITTER_EMAIL: ffflobot@users.noreply.github.com | |
GH_USER: ffflobot | |
GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}} | |
NPM_TOKEN: ${{secrets.NPM_TOKEN}} | |
run: | | |
git config --global "user.email" "${GIT_AUTHOR_EMAIL}" | |
git config --global "user.name" "${GIT_AUTHOR_NAME}" | |
REPO_URL="$(git remote get-url origin | sed -n "s/https:\/\/github.com\//https:\/\/${GIT_AUTHOR_NAME}:${GITHUB_TOKEN}@github.com\//p")" | |
git remote set-url origin "${REPO_URL}" | |
git checkout main | |
./bin/rebuild-docs.sh | |
echo "//registry.npmjs.org/:_authToken=${NPM_TOKEN}" >> "${HOME}/.npmrc" | |
yarn release |