Skip to content

Upgrade to H3 v4 (#49) #24

Upgrade to H3 v4 (#49)

Upgrade to H3 v4 (#49) #24

Workflow file for this run

on:
push:
# Sequence of patterns matched against refs/tags
tags:
- 'v*' # Push events to matching v*, i.e. v1.0, v20.15.10
name: Create Release
jobs:
create_release:
name: Create Release
runs-on: ubuntu-latest
outputs:
upload_url: ${{ steps.create_release.outputs.upload_url }}
steps:
- name: Checkout code
uses: actions/checkout@v2
- name: Create Release
id: create_release
uses: actions/create-release@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
tag_name: ${{ github.ref }}
release_name: ${{ github.ref }}
body: Release ${{ github.ref }}
draft: false
prerelease: false
ubuntu:
needs: create_release
runs-on: ubuntu-latest
strategy:
matrix:
node-version: [18.x, 20.x]
steps:
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
- uses: actions/checkout@v2
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v1
with:
node-version: ${{ matrix.node-version }}
- name: Build h3-node
run: yarn
- name: Generate Artifact
run: |
rm -rf node_modules/
rm -rf h3/
base=`basename $PWD`
cd -P ..
tar -czf /tmp/h3-node-ubuntu-${{ matrix.node-version }}.tar.gz $base
- name: Upload Artifact
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ needs.create_release.outputs.upload_url }}
asset_path: /tmp/h3-node-ubuntu-${{ matrix.node-version }}.tar.gz
asset_name: h3-node-ubuntu-${{ matrix.node-version }}.tar.gz
asset_content_type: application/gzip
windows:
needs: create_release
runs-on: windows-latest
strategy:
matrix:
node-version: [18.x, 20.x]
steps:
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
- uses: actions/checkout@v2
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v1
with:
node-version: ${{ matrix.node-version }}
- name: Build h3-node
run: yarn
- name: Generate Artifact
run: |
rm -r -fo node_modules
rm -r -fo h3
Compress-Archive -Path "$(Get-Location)" -DestinationPath "$(Join-Path (Get-Location).Path 'h3-node-windows-${{ matrix.node-version }}.zip')"
- name: Upload Artifact
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ needs.create_release.outputs.upload_url }}
asset_path: ./h3-node-windows-${{ matrix.node-version }}.zip
asset_name: h3-node-windows-${{ matrix.node-version }}.zip
asset_content_type: application/zip
macos:
needs: create_release
runs-on: macos-latest
strategy:
matrix:
node-version: [18.x, 20.x]
steps:
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
- uses: actions/checkout@v2
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v1
with:
node-version: ${{ matrix.node-version }}
- name: Build h3-node
run: yarn
- name: Generate Artifact
run: |
rm -rf node_modules/
rm -rf h3/
base=`basename $PWD`
cd -P ..
tar -czf /tmp/h3-node-macos-${{ matrix.node-version }}.tar.gz $base
- name: Upload Artifact
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ needs.create_release.outputs.upload_url }}
asset_path: /tmp/h3-node-macos-${{ matrix.node-version }}.tar.gz
asset_name: h3-node-macos-${{ matrix.node-version }}.tar.gz
asset_content_type: application/gzip