bump dev deps #39
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 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@v3 | |
- uses: actions/setup-node@v3 | |
with: | |
node-version: 16 | |
registry-url: 'https://npm.pkg.github.com' | |
scope: '@navikt' | |
- uses: actions/cache@v3 | |
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@v3 | |
- uses: actions/setup-node@v3 | |
- uses: actions/cache@v3 | |
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 |