mirror of
https://github.com/versia-pub/api.git
synced 2025-12-06 08:28:19 +01:00
refactor(build): 👷 Make CI NPM publish only be run manually
This commit is contained in:
parent
f8ef879711
commit
b4c2393e7f
13
.github/workflows/publish.yml
vendored
13
.github/workflows/publish.yml
vendored
|
|
@ -1,12 +1,14 @@
|
||||||
name: Build & Publish NPM Package
|
name: Build & Publish NPM Package
|
||||||
|
|
||||||
on:
|
on:
|
||||||
push:
|
|
||||||
branches: [main]
|
|
||||||
tags: ["v*.*.*"]
|
|
||||||
|
|
||||||
# Allows you to run this workflow manually from the Actions tab
|
# Allows you to run this workflow manually from the Actions tab
|
||||||
workflow_dispatch:
|
workflow_dispatch:
|
||||||
|
inputs:
|
||||||
|
version:
|
||||||
|
description: "Version to publish"
|
||||||
|
required: true
|
||||||
|
# Default to truncated commit hash
|
||||||
|
default: "0.0.0"
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
# Build job
|
# Build job
|
||||||
|
|
@ -28,5 +30,8 @@ jobs:
|
||||||
- name: Build
|
- name: Build
|
||||||
run: bun run build
|
run: bun run build
|
||||||
|
|
||||||
|
- name: Change version in package.json to ${{ github.event.inputs.version }}, defaulting to the truncated commit hash
|
||||||
|
run: sed -i "s/\"version\": \".*\"/\"version\": \"${{ github.event.inputs.version }}\"/" package.json
|
||||||
|
|
||||||
- name: Publish to NPM
|
- name: Publish to NPM
|
||||||
run: bunx @morlay/bunpublish --provenance
|
run: bunx @morlay/bunpublish --provenance
|
||||||
|
|
|
||||||
|
|
@ -32,7 +32,9 @@
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"description": "Type definitions for Lysand Federation, with validators.",
|
"description": "Type definitions for Lysand Federation, with validators.",
|
||||||
"categories": ["Other"],
|
"categories": [
|
||||||
|
"Other"
|
||||||
|
],
|
||||||
"type": "module",
|
"type": "module",
|
||||||
"engines": {
|
"engines": {
|
||||||
"bun": ">=1.1.8"
|
"bun": ">=1.1.8"
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue