feat(utilities): merge test coverge for partition() #4
Workflow file for this run
This file contains hidden or 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: Publish Package | |
on: | |
push: | |
tags: | |
- 'v[0-9]+.[0-9]+.[0-9]+*' | |
jobs: | |
publish: | |
if: startsWith(github.ref, 'refs/tags/v') | |
runs-on: ubuntu-latest | |
container: oven/bun:latest | |
permissions: | |
contents: read | |
packages: write | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v4 | |
- name: Install Node.js and npm | |
run: | | |
apt-get update | |
DEBIAN_FRONTEND=noninteractive apt-get install -y curl ca-certificates | |
curl -fsSL https://deb.nodesource.com/setup_20.x | bash - | |
DEBIAN_FRONTEND=noninteractive apt-get install -y nodejs | |
- name: Extract version from tag | |
id: get_version | |
run: | | |
VERSION=${GITHUB_REF#refs/tags/v} | |
echo "version=$VERSION" >> $GITHUB_OUTPUT | |
echo "Extracted version: $VERSION" | |
- name: Update package.json version | |
run: | | |
bun install -g json | |
json -I -f package.json -e "this.version='${{ steps.get_version.outputs.version }}'" | |
- name: Install dependencies | |
run: bun install | |
- name: Run tests | |
run: bun run test | |
- name: Build package | |
run: bun run build | |
- name: Setup npm auth for GitHub Packages | |
run: | | |
echo "@meeghele:registry=https://npm.pkg.github.com" >> ~/.npmrc | |
echo "//npm.pkg.github.com/:_authToken=${{ secrets.GITHUB_TOKEN }}" >> ~/.npmrc | |
- name: Publish to GitHub Packages | |
run: npm publish | |
env: | |
NODE_AUTH_TOKEN: ${{ secrets.GITHUB_TOKEN }} |