Skip to content

Bulk asynchronous downloader for multiple file hosts

ci: Add GitHub workflow for building and publishing packages

Your Name (aider)4d63b670c212
diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml
new file mode 100644
index 000000000..954e9d548
--- /dev/null
+++ b/.github/workflows/publish.yml
@@ -0,0 +1,38 @@
+name: Publish Package to GitHub Packages
+
+on:
+ push:
+ branches:
+ - main
+ release:
+ types: [created]
+
+jobs:
+ build-and-publish:
+ runs-on: ubuntu-latest
+ permissions:
+ contents: read
+ packages: write
+
+ steps:
+ - uses: actions/checkout@v3
+
+ - name: Set up environment
+ uses: actions/setup-node@v3
+ with:
+ node-version: '16'
+ registry-url: 'https://npm.pkg.github.com'
+
+ - name: Install dependencies
+ run: npm ci
+
+ - name: Run tests
+ run: npm test
+
+ - name: Build package
+ run: npm run build
+
+ - name: Publish package
+ run: npm publish
+ env:
+ NODE_AUTH_TOKEN: ${{ secrets.GITHUB_TOKEN }}