Skip to content

Commit f3c1b9b

Browse files
authored
ci(refactor): fix how publish is fired off (#93)
2 parents d10eb31 + cc8fa29 commit f3c1b9b

File tree

3 files changed

+34
-55
lines changed

3 files changed

+34
-55
lines changed

.github/workflows/ci.yml

Lines changed: 0 additions & 47 deletions
This file was deleted.
Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
name: Continuous Integration
2+
3+
on:
4+
pull_request:
5+
branches: ['main']
6+
7+
jobs:
8+
build-and-test:
9+
runs-on: ubuntu-latest
10+
11+
strategy:
12+
matrix:
13+
node-version: [22.x]
14+
# See supported Node.js release schedule at https://nodejs.org/en/about/releases/
15+
16+
steps:
17+
- uses: actions/checkout@v4
18+
- name: Use Node.js ${{ matrix.node-version }}
19+
uses: actions/setup-node@v4
20+
with:
21+
node-version: ${{ matrix.node-version }}
22+
cache: 'npm'
23+
- run: npm ci
24+
- run: npm run lint
25+
- run: npm run build
26+
- run: npm test
27+
- run: xvfb-run -a npm run test:integration

.github/workflows/package.yml renamed to .github/workflows/release-and-publish.yml

Lines changed: 7 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,16 @@
1-
name: package visx
1+
name: package and publish
22

3-
on: workflow_dispatch
4-
5-
# on:
6-
# push:
7-
# branches:
8-
# - main
3+
on:
4+
push:
5+
branches:
6+
- main
97

108
permissions:
119
contents: read # for checkout
1210

1311
jobs:
1412
release:
13+
needs: build-and-test
1514
runs-on: ubuntu-latest
1615
permissions:
1716
contents: write # to be able to publish a GitHub release
@@ -24,7 +23,7 @@ jobs:
2423
node-version: 22
2524
- run: npm ci
2625
- run: npm audit signatures
27-
- run: npx semantic-release --extends ./package.release.config.js
26+
- run: npx semantic-release --extends ./release.config.js
2827
env:
2928
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
3029
# In case you want to publish to Visual Studio Marketplace

0 commit comments

Comments
 (0)