git-backporting/.github/workflows/release.yml

37 lines
1.1 KiB
YAML
Raw Permalink Normal View History

2023-07-05 22:32:53 +02:00
name: "release package"
on:
workflow_dispatch:
inputs:
options:
description: 'Additional release-it options'
required: false
2023-07-06 00:15:14 +02:00
default: ''
2023-07-05 22:32:53 +02:00
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
jobs:
release:
name: Release package
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
2023-07-05 22:32:53 +02:00
with:
fetch-depth: 0
- name: Setup Node
uses: actions/setup-node@v4
2023-07-05 22:32:53 +02:00
with:
node-version: 18
2023-07-06 10:17:14 +02:00
- name: Git config
2023-07-05 22:32:53 +02:00
run: |
git config user.name "${GITHUB_ACTOR}"
git config user.email "${GITHUB_ACTOR}@users.noreply.github.com"
2023-07-06 10:17:14 +02:00
- name: Npm config
2023-07-05 22:32:53 +02:00
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"
2023-07-06 10:17:14 +02:00
# or check prepare-release.yml workflow
- name: New version release
run: npm run release -- --ci --no-increment --no-git.commit ${{ github.event.inputs.options }}