2024-09-03 03:14:59 +09:00
|
|
|
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:
|
2024-11-01 00:02:07 +00:00
|
|
|
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4
|
2024-09-03 03:14:59 +09:00
|
|
|
with:
|
|
|
|
fetch-depth: 0
|
2024-10-01 01:40:47 +00:00
|
|
|
- uses: actions/setup-node@0a44ba7841725637a19e28fa30b79a866c81b0a6 # v4
|
2024-09-03 03:14:59 +09:00
|
|
|
with:
|
|
|
|
node-version: lts/*
|
|
|
|
cache: npm
|
2024-09-03 03:24:35 +09:00
|
|
|
registry-url: https://registry.npmjs.org/
|
2024-09-03 03:14:59 +09:00
|
|
|
- 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 }}
|