Skip to content

fix: use gh cli for releases #4

fix: use gh cli for releases

fix: use gh cli for releases #4

Workflow file for this run

name: Build and Publish
on:
push:
branches: [main]
tags:
- 'v*'
pull_request:
branches: [main]
jobs:
build:
runs-on: ubuntu-latest
permissions:
contents: write
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: '20'
cache: 'npm'
- name: Install dependencies
run: npm ci
- name: Build
run: npm run build
- name: Create release archive
if: startsWith(github.ref, 'refs/tags/')
run: tar -czvf dist.tar.gz -C dist .
- name: Create GitHub Release
if: startsWith(github.ref, 'refs/tags/')
env:
GH_TOKEN: ${{ github.token }}
run: gh release create ${{ github.ref_name }} dist.tar.gz --generate-notes