Skip to content

Commit

Permalink
chore: update rollup.config.cjs
Browse files Browse the repository at this point in the history
  • Loading branch information
balsigergil committed Jan 27, 2024
1 parent bc587cc commit ac49562
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 15 deletions.
16 changes: 3 additions & 13 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
name: Publish Package to npmjs
name: Release
on:
release:
types: [published]
jobs:
build:
release:
runs-on: ubuntu-latest
permissions:
contents: read
Expand All @@ -13,19 +13,9 @@ jobs:
- uses: actions/setup-node@v3
with:
node-version: 20
cache: "npm"
registry-url: "https://registry.npmjs.org"
- run: npm install -g npm
- name: Get npm cache directory
id: npm-cache-dir
shell: bash
run: echo "dir=$(npm config get cache)" >> ${GITHUB_OUTPUT}
- uses: actions/cache@v3
id: npm-cache # use this to check for `cache-hit` ==> if: steps.npm-cache.outputs.cache-hit != 'true'
with:
path: ${{ steps.npm-cache-dir.outputs.dir }}
key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }}
restore-keys: |
${{ runner.os }}-node-
- run: npm ci
- run: npm run build
- run: npm publish --provenance --access public
Expand Down
4 changes: 2 additions & 2 deletions rollup.config.cjs
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@ const { defineConfig } = require("rollup");
const typescript = require("@rollup/plugin-typescript");
const terser = require("@rollup/plugin-terser");

import pkg from "./package.json" with { type: "json" };
const pkg = require("./package.json");

export default defineConfig({
module.exports = defineConfig({
input: "src/index.ts",
output: [
{
Expand Down

0 comments on commit ac49562

Please sign in to comment.