Skip to content

chore(publish): Fix workflow to publish new versions #11

chore(publish): Fix workflow to publish new versions

chore(publish): Fix workflow to publish new versions #11

Workflow file for this run

name: Release
on:
push:
branches:
- main
jobs:
tests:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
node-version: 18
cache: npm
- run: npm ci
- run: npm run typecheck
- run: npm run lint
- run: npm run format
release:
needs: tests
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
node-version: 18
- run: npm ci
- run: |
git config user.name "$(git log -n 1 --pretty=format:%an)"
git config user.email "$(git log -n 1 --pretty=format:%ae)"
- run: npm run version -- --yes --conventional-graduate
env:
GH_TOKEN: ${{secrets.GITHUB_TOKEN}}
publish-npm:
needs: release
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
with:
ref: ${{ github.ref }}
- uses: actions/setup-node@v3
with:
node-version: 18
cache: npm
registry-url: https://registry.npmjs.org/
scope: '@liip'
- run: npm ci
- run: npm run publish
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}