mirror of
https://code.forgejo.org/actions/git-backporting.git
synced 2025-02-23 02:55:43 -05:00
35 lines
1,015 B
YAML
35 lines
1,015 B
YAML
|
name: "release package"
|
||
|
|
||
|
on:
|
||
|
workflow_dispatch:
|
||
|
inputs:
|
||
|
options:
|
||
|
description: 'Additional release-it options'
|
||
|
required: false
|
||
|
default: '--dry-run'
|
||
|
|
||
|
env:
|
||
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||
|
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
|
||
|
|
||
|
jobs:
|
||
|
release:
|
||
|
name: Release package
|
||
|
runs-on: ubuntu-latest
|
||
|
steps:
|
||
|
- uses: actions/checkout@v3
|
||
|
with:
|
||
|
fetch-depth: 0
|
||
|
- name: Setup Node
|
||
|
uses: actions/setup-node@v3
|
||
|
with:
|
||
|
node-version: 18
|
||
|
- name: git config
|
||
|
run: |
|
||
|
git config user.name "${GITHUB_ACTOR}"
|
||
|
git config user.email "${GITHUB_ACTOR}@users.noreply.github.com"
|
||
|
- name: npm config
|
||
|
run: npm config set //registry.npmjs.org/:_authToken $NPM_TOKEN
|
||
|
- run: npm ci
|
||
|
# the version/changelog must be already updated on main branch using "npm run release:prepare"
|
||
|
- run: npm run release --ci --no-increment --no-git.commit ${{ github.event.inputs.options }}
|