Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
54 changes: 54 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
name: Release Package

on:
workflow_dispatch:
inputs:
publish_type:
description: 'Choose publish type: dry-run, main'
required: true
default: 'dry-run'
type: choice
options:
- dry-run
- main
confirm_publish:
description: 'Type YES to confirm publishing (required for main release)'
required: false
default: ''

permissions:
id-token: write

jobs:
publish:
if: ${{ (github.event.inputs.publish_type == 'main' && github.event.inputs.confirm_publish == 'YES' && github.ref_name == 'main') || github.event.inputs.publish_type == 'dry-run' }}
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v3

- name: Set up Node.js
uses: actions/setup-node@v3
with:
node-version: '20'
registry-url: 'https://registry.npmjs.org'

- name: Set up pnpm
uses: pnpm/action-setup@v2
with:
version: 8.9.2

- name: Install dependencies
run: pnpm i

- name: Publish package (dry)
if: ${{github.event.inputs.publish_type == 'dry-run' }}
run: pnpm release:dry --no-git-checks

- name: Publish package
if: ${{ github.event.inputs.publish_type == 'main' }}
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
REPOSITORY: ${{ github.repository }}
REF: ${{ github.ref }}
run: pnpm release:latest
5 changes: 4 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1 +1,4 @@
node_modules
node_modules
dist
pnpm-lock.yaml
coverage
8 changes: 8 additions & 0 deletions .prettierrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
{
"printWidth": 80,
"tabWidth": 2,
"trailingComma": "all",
"singleQuote": true,
"arrowParens": "avoid",
"endOfLine": "lf"
}
Loading