Skip to content

Commit

Permalink
ci: Releasing via github actions
Browse files Browse the repository at this point in the history
  • Loading branch information
zcbenz committed May 3, 2024
1 parent a5b62e2 commit 0db04e9
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 4 deletions.
8 changes: 6 additions & 2 deletions .github/workflows/post-release.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
name: npm-publish

on:
workflow_dispatch:
release:
types: [published]

Expand All @@ -19,7 +18,12 @@ jobs:
- name: Set package version
run: |
npm config set git-tag-version=false
npm version $VERSION
npm version ${{ inputs.version || '$VERSION' }}
- name: Install deps
run: yarn

- name: Publish npm package
uses: JS-DevTools/npm-publish@v3
with:
token: ${{ secrets.NPM_TOKEN }}
4 changes: 2 additions & 2 deletions install.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
const packageJson = require('./package.json');

// Local developement.
if (packageJson.version === '0.0.1-dev' && !process.argv.includes('--force'))
if (packageJson.version === '0.0.1-dev')
process.exit(0);

const fs = require('node:fs');
Expand Down Expand Up @@ -32,7 +32,7 @@ async function main() {
if (!response.ok)
throw new Error(`HTTP error! Status: ${response.status}`);

const pipeline = promisify(stream.pipeline);
const pipeline = util.promisify(stream.pipeline);
const gunzip = zlib.createGunzip();
await pipeline(response.body,
gunzip,
Expand Down

0 comments on commit 0db04e9

Please sign in to comment.