Skip to content

0.1.2

0.1.2 #3

Workflow file for this run

# This workflow will run tests using node and then publish a package to GitHub Packages when a release is created
# For more information see: https://docs.github.com/en/actions/publishing-packages/publishing-nodejs-packages
name: publish
on:
workflow_dispatch:
inputs:
version:
description: "the package version you want to bump"
required: true
default: "keep current"
type: choice
options:
- "keep current"
push:
tags:
- "v*.*.*"
jobs:
publish-npm:
permissions:
id-token: write
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
submodules: "recursive"
- uses: actions/setup-node@v4
with:
node-version: "lts/*"
registry-url: https://registry.npmjs.org/
- uses: pnpm/action-setup@v2
name: Install pnpm
with:
version: 8
- name: Get pnpm store directory
shell: bash
run: |
echo "STORE_PATH=$(pnpm store path --silent)" >> $GITHUB_ENV
- uses: actions/cache@v3
name: Setup pnpm cache
with:
path: |
${{ env.STORE_PATH }}
key: ${{ runner.os }}-pnpm-store-${{ hashFiles('**/pnpm-lock.yaml') }}
restore-keys: |
${{ runner.os }}-pnpm-store-
- name: Install Dependencies
run: pnpm i
- name: build
run: |
pnpm esb
- run: npm publish --provenance --access public
env:
NODE_AUTH_TOKEN: ${{secrets.NPM_TOKEN}}
publish-ghp:
runs-on: ubuntu-latest
env:
SCOPE: "@${{github.repository_owner}}"
permissions:
contents: read
packages: write
id-token: write
steps:
- uses: actions/checkout@v4
with:
submodules: "recursive"
- uses: actions/setup-node@v4
with:
node-version: "lts/*"
registry-url: "https://npm.pkg.github.com/"
# Defaults to the user or organization that owns the workflow file
scope: ${{env.SCOPE}}
token: ${{secrets.GITHUB_TOKEN}}
always-auth: true
- uses: pnpm/action-setup@v2
name: Install pnpm
with:
version: 8
- name: Get pnpm store directory
shell: bash
run: |
echo "STORE_PATH=$(pnpm store path --silent)" >> $GITHUB_ENV
- uses: actions/cache@v3
name: Setup pnpm cache
with:
path: |
${{ env.STORE_PATH }}
key: ${{ runner.os }}-pnpm-store-${{ hashFiles('**/pnpm-lock.yaml') }}
restore-keys: |
${{ runner.os }}-pnpm-store-
- name: Install Dependencies
run: pnpm i
- name: build
run: |
pnpm esb
- run: |
node .github/workflows/package.cjs
- run: npm publish --registry=https://npm.pkg.github.com
env:
NODE_AUTH_TOKEN: ${{secrets.GITHUB_TOKEN}}