mirror of
https://github.com/kou029w/websri.git
synced 2025-01-18 16:08:16 +00:00
36 lines
995 B
YAML
36 lines
995 B
YAML
|
name: release
|
||
|
run-name: "${{ inputs.version }}"
|
||
|
on:
|
||
|
workflow_dispatch:
|
||
|
inputs:
|
||
|
version:
|
||
|
description: 'Increment "major", "minor", "patch", or "pre*" version; or specify version'
|
||
|
default: patch
|
||
|
required: true
|
||
|
jobs:
|
||
|
main:
|
||
|
if: github.ref == 'refs/heads/main'
|
||
|
runs-on: ubuntu-latest
|
||
|
timeout-minutes: 15
|
||
|
permissions:
|
||
|
contents: write
|
||
|
packages: write
|
||
|
steps:
|
||
|
- uses: actions/checkout@v4
|
||
|
with:
|
||
|
fetch-depth: 0
|
||
|
- uses: actions/setup-node@v4
|
||
|
with:
|
||
|
node-version: lts/*
|
||
|
cache: npm
|
||
|
- run: npm ci
|
||
|
- run: npm test
|
||
|
- name: Release
|
||
|
run: |
|
||
|
git config user.email "${{ github.actor }}@users.noreply.github.com"
|
||
|
git config user.name "${{ github.actor }}"
|
||
|
npm run release -- "${{ github.event.inputs.version }}"
|
||
|
env:
|
||
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||
|
NODE_AUTH_TOKEN: ${{ secrets.NODE_AUTH_TOKEN }}
|