chore: Release 2.4.9 #40
Workflow file for this run
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: Create Release | |
on: | |
push: | |
tags: ["v*"] | |
jobs: | |
build-matrix: | |
strategy: | |
matrix: | |
node-version: | |
- 18.x | |
os: | |
- windows-2019 | |
- ubuntu-22.04 | |
# arm64 | |
- macos-14 | |
# x86_64 | |
- macos-13 | |
runs-on: ${{ matrix.os }} | |
steps: | |
- uses: actions/checkout@v2 | |
- name: Use Node.js ${{ matrix.node-version }} | |
uses: actions/setup-node@v3 | |
with: | |
node-version: ${{ matrix.node-version }} | |
- name: Install Build Dependencies | |
if: ${{ startsWith(matrix.os, 'macos') }} | |
run: brew install unixodbc | |
- name: Upgrade NPM | |
run: npm install -g npm | |
- name: Install node-gyp | |
run: npm install -g node-gyp | |
- name: Install npm dependencies | |
run: npm ci --production | |
- name: Patch node-pre-gyp on Windows | |
if: ${{ startsWith(matrix.os, 'windows') }} | |
# https://github.com/mapbox/node-pre-gyp/issues/715 | |
run: node .github/fix-node-pre-gyp-windows.js | |
- name: Build Binary | |
run: ./node_modules/.bin/node-pre-gyp rebuild --production | |
- name: Package Binary | |
run: ./node_modules/.bin/node-pre-gyp package | |
- name: Upload Artifact | |
uses: actions/upload-artifact@v3 | |
with: | |
name: ${{ matrix.os }}-binaries | |
path: build/stage/*.tar.gz | |
create-release: | |
runs-on: ubuntu-latest | |
needs: build-matrix | |
steps: | |
- uses: actions/checkout@v2 | |
- name: get-npm-version | |
id: package-version | |
run: jq -r '"version=" + .version' package.json >> "$GITHUB_OUTPUT" | |
# Download all of the various binaries that were created | |
- name: Download built binaries from workflow | |
uses: actions/download-artifact@v3 | |
- name: Create Release | |
id: create_release | |
uses: softprops/action-gh-release@v2 | |
with: | |
draft: false | |
prerelease: false | |
name: ${{ steps.package-version.outputs.version }} | |
generate_release_notes: true | |
fail_on_unmatched_files: true | |
files: | |
./*-binaries/odbc-*.tar.gz | |
- name: Publish to NPM | |
uses: JS-DevTools/npm-publish@v3 | |
with: | |
token: ${{ secrets.NPM_TOKEN }} |