Skip to content

Publish package

Publish package #25

Workflow file for this run

name: Publish package
on:
create:
tags:
- v*
jobs:
publish:
permissions:
contents: write
runs-on: ubuntu-latest
timeout-minutes: 15
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: '20'
registry-url: 'https://registry.npmjs.org/'
# PNPM stuff
- name: Install pnpm
uses: pnpm/action-setup@v4
id: pnpm-install
with:
version: 8
run_install: false
- name: Get pnpm store directory
id: pnpm-cache
run: |
echo "STORE_PATH=$(pnpm store path)" >> $GITHUB_OUTPUT
- uses: actions/cache@v4
name: Setup pnpm cache
with:
path: ${{ steps.pnpm-cache.outputs.STORE_PATH }}
key: ${{ runner.os }}-pnpm-store-${{ hashFiles('**/pnpm-lock.yaml') }}
restore-keys: |
${{ runner.os }}-pnpm-store-
- name: Install node dependencies
run: pnpm install
- name: Build package
run: pnpm build
- name: Pack package
run: pnpm pack
- name: Publish package
run: pnpm npm-publish
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
- name: Create Release
uses: softprops/action-gh-release@v1
with:
files: sqlauthz-*.tgz