first commit
This commit is contained in:
@@ -0,0 +1,50 @@
|
||||
name: Release
|
||||
|
||||
on:
|
||||
push:
|
||||
tags: ['v*']
|
||||
workflow_dispatch:
|
||||
inputs:
|
||||
dry_run:
|
||||
description: 'Build artifacts without uploading'
|
||||
required: false
|
||||
default: 'false'
|
||||
|
||||
permissions:
|
||||
contents: write
|
||||
|
||||
jobs:
|
||||
release:
|
||||
runs-on: ubuntu-latest
|
||||
timeout-minutes: 30
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
|
||||
- uses: actions/setup-node@v4
|
||||
with:
|
||||
node-version: '22'
|
||||
|
||||
- name: Install + test
|
||||
run: |
|
||||
npm install --no-audit --no-fund
|
||||
SKIP_INTEGRATION=1 npm test
|
||||
|
||||
- name: Pack source tarball
|
||||
run: |
|
||||
set -euo pipefail
|
||||
VERSION="${GITHUB_REF_NAME:-manual}"
|
||||
NAME="peardata-${VERSION}"
|
||||
mkdir -p dist
|
||||
tar --exclude=node_modules --exclude=.git --exclude=data --exclude=dist \
|
||||
-czf "dist/${NAME}.tar.gz" .
|
||||
(cd dist && sha256sum "${NAME}.tar.gz" > "${NAME}.tar.gz.sha256")
|
||||
ls -la dist
|
||||
|
||||
- name: Upload GitHub Release
|
||||
if: startsWith(github.ref, 'refs/tags/') && github.event.inputs.dry_run != 'true'
|
||||
uses: softprops/action-gh-release@v2
|
||||
with:
|
||||
files: dist/*
|
||||
generate_release_notes: true
|
||||
env:
|
||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
Reference in New Issue
Block a user