This repository has been archived by the owner on Sep 18, 2024. It is now read-only.
use next tag for duckdbwasm #79
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: Node.js CI and Manual Release | |
on: | |
push: | |
branches: [main] | |
pull_request: | |
branches: [main] | |
workflow_dispatch: | |
inputs: | |
version: | |
description: "Version to release" | |
required: true | |
type: string | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: pnpm/action-setup@v4 | |
with: | |
version: 8 | |
- uses: actions/setup-node@v4 | |
with: | |
node-version: 20 | |
cache: "pnpm" | |
- run: pnpm install | |
- run: pnpm build | |
- run: pnpm test | |
- run: zip -r build.zip build | |
- uses: actions/upload-artifact@v3 | |
with: | |
name: build | |
path: build.zip | |
release: | |
needs: build | |
if: github.event_name == 'workflow_dispatch' | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: actions/download-artifact@v3 | |
with: | |
name: build | |
- name: Create Release | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
run: | | |
gh release create v${{ github.event.inputs.version }} \ | |
--title "Release v${{ github.event.inputs.version }}" \ | |
--notes "Release notes for version ${{ github.event.inputs.version }}" \ | |
build.zip |