Build on Windows #19
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Build on Windows | |
on: | |
workflow_dispatch: | |
# push: | |
# branches: | |
# - master | |
jobs: | |
build: | |
runs-on: windows-latest | |
strategy: | |
matrix: | |
node: [ 16, 18, 20 ] | |
libpg: [ 16 ] | |
architecture: [ 'x64' ] | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Download libpq_query ${{ matrix.libpg }}-latest | |
working-directory: ${{env.GITHUB_WORKSPACE}} | |
# run: git clone -b "${{ matrix.libpg }}-latest" https://github.com/pganalyze/libpg_query.git | |
run: git clone -b "master" https://github.com/MGorkov/libpg_query.git | |
- name: Set up Visual Studio shell | |
uses: egor-tensin/vs-shell@v2 | |
- name: Build libpg_query on windows | |
working-directory: ${{env.GITHUB_WORKSPACE}} | |
shell: cmd | |
run: | | |
cd libpg_query | |
nmake /F Makefile.msvc | |
- name: Setup Node.JS v${{ matrix.node }} and run install | |
uses: actions/setup-node@v4 | |
with: | |
node-version: ${{ matrix.node }} | |
architecture: ${{ matrix.architecture }} | |
- name: Install | |
run: npm install | |
- name: Package | |
run: npm run binary:package | |
- name: Publish | |
env: | |
AWS_ACCESS_KEY_ID: ${{ secrets.NODE_PRE_GYP_ACCESSKEYID }} | |
AWS_SECRET_ACCESS_KEY: ${{ secrets.NODE_PRE_GYP_SECRETACCESSKEY }} | |
run: npm run binary:publish |