Skip to content

chore(deps): bump helmet from 7.1.0 to 8.0.0 (#1499) #2323

chore(deps): bump helmet from 7.1.0 to 8.0.0 (#1499)

chore(deps): bump helmet from 7.1.0 to 8.0.0 (#1499) #2323

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@v4
- name: Set up Node.js
uses: actions/setup-node@v4
with:
node-version: 20.x
- name: Set yarn cache directory
id: yarn-cache-dir-path
run: echo "dir=$(yarn config get cacheFolder)" >> $GITHUB_OUTPUT
- name: Get yarn cache
uses: actions/cache@v4
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 lint
yarn test
yarn dist
- name: Release on npm
if: |
github.event_name != 'pull_request' &&
!startsWith(github.event.head_commit.message, 'chore(deps')
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
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")"
yarn release -r "${REPO_URL}"
- name: Release on GitHub
if: |
github.event_name != 'pull_request' &&
!startsWith(github.event.head_commit.message, 'chore(deps')
env:
GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}}
run: |
echo "//npm.pkg.github.com/:_authToken=${GITHUB_TOKEN}" > ~/.npmrc
sed -i -E "s/\"name\": \"([^@].+)/\"name\": \"@ffflorian\/\1/" package.json
npm publish --registry=https://npm.pkg.github.com || true