Skip to content

Commit 562ffe5

Browse files
committed
Remove old publishing logic and prebuild
1 parent fc162a4 commit 562ffe5

File tree

1 file changed

+6
-120
lines changed

1 file changed

+6
-120
lines changed

.github/workflows/build.yml

Lines changed: 6 additions & 120 deletions
Original file line numberDiff line numberDiff line change
@@ -28,14 +28,14 @@ jobs:
2828
matrix:
2929
os:
3030
- ubuntu-20.04
31-
- macos-13
32-
- macos-14
33-
- windows-2019
31+
# - macos-13
32+
# - macos-14
33+
# - windows-2019
3434
node:
35-
- 18
36-
- 20
35+
# - 18
36+
# - 20
3737
- 22
38-
- 23
38+
# - 23
3939
name: Testing Node ${{ matrix.node }} on ${{ matrix.os }}
4040
runs-on: ${{ matrix.os }}
4141
steps:
@@ -63,117 +63,3 @@ jobs:
6363
sudo apt update
6464
sudo apt install libsqlite3-mod-spatialite -y
6565
node -e "require('./lib/index.js')(':memory:').loadExtension('mod_spatialite').exec('SELECT InitSpatialMetaData();')"
66-
67-
publish:
68-
if: ${{ github.event_name == 'release' }}
69-
name: Publishing to NPM
70-
runs-on: ubuntu-20.04
71-
needs:
72-
- prebuild
73-
- prebuild-alpine
74-
- prebuild-alpine-arm
75-
- prebuild-linux-arm
76-
steps:
77-
- uses: actions/checkout@v4
78-
- uses: actions/setup-node@v4
79-
with:
80-
node-version: 18
81-
registry-url: https://registry.npmjs.org
82-
- run: npm publish
83-
env:
84-
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
85-
86-
prebuild:
87-
if: ${{ github.event_name == 'release' }}
88-
strategy:
89-
fail-fast: false
90-
matrix:
91-
os:
92-
- ubuntu-20.04
93-
- macos-13
94-
- macos-14
95-
- windows-2019
96-
name: Prebuild on ${{ matrix.os }}
97-
runs-on: ${{ matrix.os }}
98-
needs: test
99-
steps:
100-
- uses: actions/checkout@v4
101-
- uses: actions/setup-node@v4
102-
with:
103-
node-version: 18
104-
- if: ${{ startsWith(matrix.os, 'windows') }}
105-
run: pip.exe install setuptools
106-
- if: ${{ startsWith(matrix.os, 'macos') }}
107-
run: brew install python-setuptools
108-
- if: ${{ !startsWith(matrix.os, 'windows') && !startsWith(matrix.os, 'macos') }}
109-
run: python3 -m pip install setuptools
110-
- if: ${{ startsWith(matrix.os, 'ubuntu') }}
111-
run: |
112-
sudo apt update
113-
sudo apt install gcc-10 g++-10 -y
114-
sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-10 100 --slave /usr/bin/g++ g++ /usr/bin/g++-10 --slave /usr/bin/gcov gcov /usr/bin/gcov-10
115-
- run: npm install --ignore-scripts
116-
- run: ${{ env.NODE_BUILD_CMD }} -u ${{ secrets.GITHUB_TOKEN }}
117-
- run: ${{ env.ELECTRON_BUILD_CMD }} -u ${{ secrets.GITHUB_TOKEN }}
118-
- if: matrix.os == 'windows-2019'
119-
run: |
120-
${{ env.NODE_BUILD_CMD }} --arch ia32 -u ${{ secrets.GITHUB_TOKEN }}
121-
${{ env.NO_V18_NODE_BUILD_CMD }} --arch arm64 -u ${{ secrets.GITHUB_TOKEN }}
122-
${{ env.ELECTRON_BUILD_CMD }} --arch ia32 -u ${{ secrets.GITHUB_TOKEN }}
123-
${{ env.ELECTRON_BUILD_CMD }} --arch arm64 -u ${{ secrets.GITHUB_TOKEN }}
124-
125-
prebuild-alpine:
126-
if: ${{ github.event_name == 'release' }}
127-
strategy:
128-
fail-fast: false
129-
name: Prebuild on alpine
130-
runs-on: ubuntu-latest
131-
container: node:18-alpine
132-
needs: test
133-
steps:
134-
- uses: actions/checkout@v4
135-
- run: apk add build-base git python3 py3-setuptools --update-cache
136-
- run: npm install --ignore-scripts
137-
- run: ${{ env.NODE_BUILD_CMD }} -u ${{ secrets.GITHUB_TOKEN }}
138-
139-
prebuild-alpine-arm:
140-
if: ${{ github.event_name == 'release' }}
141-
strategy:
142-
fail-fast: false
143-
matrix:
144-
arch:
145-
- arm/v7
146-
- arm64
147-
name: Prebuild on alpine (${{ matrix.arch }})
148-
runs-on: ubuntu-latest
149-
needs: test
150-
steps:
151-
- uses: actions/checkout@v4
152-
- uses: docker/setup-qemu-action@v3
153-
- run: |
154-
docker run --rm -v $(pwd):/tmp/project --entrypoint /bin/sh --platform linux/${{ matrix.arch }} node:18-alpine -c "\
155-
apk add build-base git python3 py3-setuptools --update-cache && \
156-
cd /tmp/project && \
157-
npm install --ignore-scripts && \
158-
${{ env.NODE_BUILD_CMD }} -u ${{ secrets.GITHUB_TOKEN }}"
159-
160-
prebuild-linux-arm:
161-
if: ${{ github.event_name == 'release' }}
162-
strategy:
163-
fail-fast: false
164-
matrix:
165-
arch:
166-
- arm/v7
167-
- arm64
168-
name: Prebuild on Linux (${{ matrix.arch }})
169-
runs-on: ubuntu-latest
170-
needs: test
171-
steps:
172-
- uses: actions/checkout@v4
173-
- uses: docker/setup-qemu-action@v3
174-
- run: |
175-
docker run --rm -v $(pwd):/tmp/project --entrypoint /bin/sh --platform linux/${{ matrix.arch }} node:18-bullseye -c "\
176-
cd /tmp/project && \
177-
npm install --ignore-scripts && \
178-
${{ env.NODE_BUILD_CMD }} -u ${{ secrets.GITHUB_TOKEN }} && \
179-
if [ '${{ matrix.arch }}' = 'arm64' ]; then ${{ env.ELECTRON_BUILD_CMD }} --arch arm64 -u ${{ secrets.GITHUB_TOKEN }}; fi"

0 commit comments

Comments
 (0)