Skip to content

chore(deps): bump deps #53

chore(deps): bump deps

chore(deps): bump deps #53

Workflow file for this run

name: Build and publish library
on:
push:
branches: ['main']
env:
NPM_AUTH_TOKEN: ${{ secrets.READER_TOKEN }}
permissions:
actions: read
contents: write
packages: write
id-token: write
jobs:
build:
if: "!contains(github.event.head_commit.message, '[docs]')"
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: 20
registry-url: 'https://npm.pkg.github.com'
scope: '@navikt'
- uses: actions/cache@v4
id: yarn-cache
with:
path: .yarn/cache
key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }}
restore-keys: |
${{ runner.os }}-yarn-
- run: yarn --immutable
- run: yarn build
- run: npm publish
if: github.ref == 'refs/heads/main'
env:
NODE_AUTH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
increment-version:
if: github.ref == 'refs/heads/main'
runs-on: ubuntu-latest
needs: [build]
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
- uses: actions/cache@v4
id: yarn-cache
with:
path: .yarn/cache
key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }}
restore-keys: |
${{ runner.os }}-yarn-
- name: Setup github connection for auth
run: |
git config --global user.email "github-actions[bot]@users.noreply.github.com"
git config --global user.name "github-actions[bot]"
git remote set-url origin https://github-actions[bot]:[email protected]/$GITHUB_REPOSITORY.git
- run: yarn version -i minor
- run: git add . && git commit -m "[skip ci] bump version to $(jq -r .version package.json)" && git push