Skip to content

Release Downport

Release Downport #12

name: Release Downport
on:
workflow_dispatch:
inputs:
release_type:
description: 'Release Type: use patch | minor | major or leave empty for auto'
required: false
default: ''
npm_tag:
description: 'npm dist tag'
required: true
default: 'v1'
jobs:
build-and-release:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
token: ${{ secrets.UI5_WEBCOMP_BOT_GH_TOKEN }}
fetch-depth: 0
- uses: actions/[email protected]
with:
node-version: 20
cache: 'yarn'
- name: Install
run: yarn --frozen-lockfile
- name: Version Bump
env:
NPM_USERNAME: ${{ secrets.NPM_USER }}
NPM_EMAIL: ${{ secrets.NPM_EMAIL }}
NPM_AUTH_TOKEN: ${{ secrets.NPM_RELEASE_AUTH_TOKEN }}
GH_TOKEN: ${{ secrets.UI5_WEBCOMP_BOT_GH_TOKEN }}
run: |
npm config set //registry.npmjs.org/:_authToken=${NPM_AUTH_TOKEN}
git config user.name "${{ secrets.UI5_WEBCOMP_BOT_NAME }}"
git config user.email "${{ secrets.UI5_WEBCOMP_BOT_EMAIL }}"
yarn lerna version ${{ github.event.inputs.release_type }} --conventional-graduate --force-conventional-graduate --yes --exact --create-release github
- name: Build
run: yarn ci:releasebuild
- name: Publish
env:
NPM_USERNAME: ${{ secrets.NPM_USER }}
NPM_EMAIL: ${{ secrets.NPM_EMAIL }}
NPM_AUTH_TOKEN: ${{ secrets.NPM_RELEASE_AUTH_TOKEN }}
GH_TOKEN: ${{ secrets.UI5_WEBCOMP_BOT_GH_TOKEN }}
run: yarn lerna publish from-git --yes --dist-tag ${{ github.event.inputs.npm_tag }}
- name: Publish Release Comments
uses: actions/github-script@v7
env:
GH_TOKEN: ${{ secrets.UI5_WEBCOMP_BOT_GH_TOKEN }}
with:
github-token: ${{ secrets.UI5_WEBCOMP_BOT_GH_TOKEN }}
script: |
const commentOnFixedIssues = (await import('${{ github.workspace }}/.github/actions/commentOnFixedIssues.mjs')).default;
await commentOnFixedIssues({ github, context })