Skip to content

Commit 56ae206

Browse files
committed
Create publish workflow. Rename package
1 parent 966b13b commit 56ae206

File tree

4 files changed

+41
-6
lines changed

4 files changed

+41
-6
lines changed

.github/workflows/publish.yml

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
name: Publish to npm
2+
3+
on:
4+
push:
5+
branches:
6+
- main
7+
8+
jobs:
9+
publish:
10+
runs-on: ubuntu-latest
11+
12+
steps:
13+
- name: Checkout code
14+
uses: actions/checkout@v4
15+
16+
- name: Set up Node.js
17+
uses: actions/setup-node@v4
18+
with:
19+
node-version: '22'
20+
registry-url: 'https://registry.npmjs.org'
21+
22+
- name: Install dependencies
23+
run: npm install
24+
25+
- name: Bump version and create tag
26+
run: |
27+
git config --global user.name "github-actions[bot]"
28+
git config --global user.email "github-actions[bot]@users.noreply.github.com"
29+
npm version minor -m "Release %s [skip ci]"
30+
git push origin main --follow-tags
31+
32+
- name: Publish to npm
33+
run: npm publish
34+
env:
35+
NODE_AUTH_TOKEN: ${{ secrets.NPM_PUBLISH_TOKEN }}

.github/workflows/test-compatibility.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,9 +23,9 @@ jobs:
2323
working-directory: ./website-scraper-puppeteer
2424
run: npm install
2525

26-
- name: Install compatibility package from the branch
26+
- name: Install version bridge package from the branch
2727
working-directory: ./website-scraper-puppeteer
28-
run: npm install website-scraper/website-scraper-puppeteer-compatibility-bridge#${{ github.head_ref }} --save
28+
run: npm install website-scraper/website-scraper-puppeteer-version-bridge#${{ github.head_ref }} --save
2929

3030
- name: Disable AppArmor
3131
run: echo 0 | sudo tee /proc/sys/kernel/apparmor_restrict_unprivileged_userns

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
# website-scraper-puppeteer-compatibility-bridge
1+
# website-scraper-puppeteer-version-bridge

package.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
2-
"name": "website-scraper-puppeteer-compatibility-bridge",
3-
"version": "2.0.0",
4-
"description": "Compatibility bridge to support latest versions of puppeteer inside the website-scraper-puppeteer module",
2+
"name": "@website-scraper/puppeteer-version-bridge",
3+
"version": "0.0.1",
4+
"description": "Version bridge to support latest versions of puppeteer inside the website-scraper-puppeteer module",
55
"main": "index.js",
66
"scripts": {
77
"test": "echo \"Error: no test specified\" && exit 1"

0 commit comments

Comments
 (0)