Skip to content

User agent client hints support #67

User agent client hints support

User agent client hints support #67

Workflow file for this run

name: Release
on:
pull_request:
branches:
- main
push:
branches:
- main
jobs:
publish:
name: Publish
runs-on: ubuntu-latest
if: "!contains(github.event.head_commit.message, 'ci skip') && !contains(github.event.head_commit.message, 'skip ci')"
env:
GITHUB_TOKEN: ${{ secrets.GH_TOKEN }}
NPM_REGISTRY_TOKEN: ${{ secrets.NPM_REGISTRY_TOKEN }}
NPM_TOKEN: ${{ secrets.NPM_REGISTRY_TOKEN }}
steps:
- uses: actions/checkout@v4
- name: Prepare repository
run: git fetch --unshallow --tags
- name: Unset header
# https://github.com/intuit/auto/issues/1030
run: git config --local --unset http.https://github.com/.extraheader
- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version-file: '.nvmrc'
- name: Cache node modules
uses: actions/cache@v1
with:
path: node_modules
key: npm-deps-${{ hashFiles('package-lock.json') }}
restore-keys: |
npm-deps-${{ hashFiles('package-lock.json') }}
- name: Setup packages
run: |
npm ci
- name: Check code style
run: npm run fmt:check
- name: Test
run: npm run test
- name: Release Info
run: npm whoami && npx auto info || echo 'auto info returned 1'
- name: Create Release
run: npm run release
- name: Update package-lock's
if: github.event_name != 'pull_request'
run: |
npm i --package-lock-only
- name: Extract branch name
if: github.event_name != 'pull_request'
shell: bash
run: echo "##[set-output name=branch;]$(echo ${GITHUB_REF#refs/heads/})"
id: extract_branch
- name: Commit & Push package-lock's
if: github.event_name != 'pull_request'
uses: actions-js/push@master
with:
github_token: ${{ secrets.GH_TOKEN }}
message: 'chore: update package-locks [skip ci]'
branch: ${{ steps.extract_branch.outputs.branch }}
author_name: Salute Frontend Team
author_email: salute.developers@gmail.com