Skip to content

Version 1.0.1

Version 1.0.1 #7

Workflow file for this run

# This workflow will do a clean installation of node dependencies, cache/restore them, build the source code and run tests across different versions of node
# For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-nodejs
name: Node.js CI
on:
push:
branches: [ "main" ]
pull_request:
branches: [ "main" ]
jobs:
build:
runs-on: ubuntu-latest
outputs:
version: ${{ steps.set_version.outputs.version }}
strategy:
matrix:
node-version: [18.x]
# See supported Node.js release schedule at https://nodejs.org/en/about/releases/
steps:
- uses: actions/checkout@v3
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v3
with:
node-version: ${{ matrix.node-version }}
cache: 'npm'
- name: Extract version from package.json
id: set_version
run: echo "::set-output name=version::$(node -p "require('./package.json').version")"
- name: Setup
run: npm ci
- name: Build
run: npm run build --if-present
- name: Zip binaries
run: zip -r release-${{ steps.set_version.outputs.version }}.zip ./dist/*
- name: Upload Artifacts
uses: actions/upload-artifact@v3
with:
name: binaries-${{ steps.set_version.outputs.version }}.zip
path: release-${{ steps.set_version.outputs.version }}.zip
release:
needs: build
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v3
- name: Download Artifacts
uses: actions/download-artifact@v3
with:
name: binaries-${{ needs.build.outputs.version }}.zip
- name: Create Release
uses: softprops/action-gh-release@v1
with:
files: binaries-${{ needs.build.outputs.version }}.zip
tag_name: v${{ needs.build.outputs.version }}
release_name: Release ${{ needs.build.outputs.version }}
draft: false
prerelease: false
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}