Skip to content

Publish latest release #70

Publish latest release

Publish latest release #70

name: "Publish latest release"
on:
workflow_dispatch:
branches: [main]
jobs:
publish:
name: Publish latest packages
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
with:
token: ${{ secrets.BSNORG_ACTIONS_SECRET }}
# pulls all commits (needed for lerna / semantic release to correctly version)
fetch-depth: "0"
- name: Setup .npmrc file for publish
uses: actions/setup-node@v3
with:
node-version: "16"
registry-url: "https://registry.npmjs.org"
cache: "npm"
- name: Turbo Cache
id: turbo-cache
uses: actions/cache@v3
with:
path: .turbo
key: turbo-${{ runner.os }}-${{ github.sha }}
restore-keys: |
turbo-${{ runner.os }}
- run: npm ci
- run: npm run build -- --cache-dir=".turbo"
- name: Publish
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
GH_TOKEN: ${{ secrets.BSNORG_ACTIONS_SECRET }}
GITHUB_TOKEN: ${{ secrets.BSNORG_ACTIONS_SECRET }}
run: |
git config user.name 'github-actions[bot]'
git config user.email 'github-actions[bot]@users.noreply.github.com'
npx lerna publish --dist-tag latest --conventional-graduate --yes --create-release github