Skip to content

Commit

Permalink
feat: automatically publish to npm (#350)
Browse files Browse the repository at this point in the history
- Fixes #66
  • Loading branch information
styfle authored Jan 9, 2023
1 parent 3752238 commit 3e26862
Show file tree
Hide file tree
Showing 4 changed files with 31 additions and 3 deletions.
14 changes: 12 additions & 2 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,10 @@ on:
pull_request:
branches: ['main']

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: ${{ github.ref != 'refs/heads/main' }}

jobs:
test:
name: Node.js ${{ matrix.node }} on ${{ matrix.os }}
Expand All @@ -21,11 +25,17 @@ jobs:
uses: actions/checkout@v3
- name: Use pnpm
run: corepack enable pnpm && pnpm --version
- name: Use Node.js ${{ matrix.node-version }}
- name: Use Node.js ${{ matrix.node }}
uses: actions/setup-node@v3
with:
node-version: ${{ matrix.node-version }}
node-version: ${{ matrix.node }}
cache: 'pnpm'
- run: pnpm install
- run: pnpm build
- run: pnpm test
- name: Maybe Release
if: matrix.os == 'ubuntu-latest' && matrix.node == 18 && github.event_name == 'push' && github.ref == 'refs/heads/main'
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
NPM_TOKEN: ${{ secrets.NPM_TOKEN_ELEVATED }}
run: pnpm dlx [email protected]
14 changes: 14 additions & 0 deletions .github/workflows/pr.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
name: PR
on:
pull_request:
types: [opened, edited, synchronize]
pull_request_target:
types: [opened, edited, synchronize]

jobs:
lint:
runs-on: ubuntu-latest
steps:
- uses: amannn/action-semantic-pull-request@0b14f54ac155d88e12522156e52cb6e397745cfd
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "satori",
"version": "0.0.46",
"version": "0.0.0-development",
"description": "Enlightened library to convert HTML and CSS to SVG.",
"module": "./dist/index.js",
"main": "./dist/index.js",
Expand Down
4 changes: 4 additions & 0 deletions release.config.cjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
module.exports = {
branches: ['main'],
tagFormat: '${version}',
}

1 comment on commit 3e26862

@vercel
Copy link

@vercel vercel bot commented on 3e26862 Jan 9, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.