Build release #14
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Build release | |
on: | |
workflow_dispatch: | |
inputs: | |
package: | |
description: 'Package to release' | |
type: choice | |
required: true | |
options: | |
- '@ionos-deploy-now/actions-core' | |
- '@ionos-deploy-now/eslint-config-actions' | |
- '@ionos-deploy-now/prettier-config-actions' | |
version: | |
description: 'Version of release' | |
type: string | |
required: true | |
jobs: | |
release: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: actions/setup-node@v4 | |
with: | |
node-version: 20 | |
registry-url: 'https://npm.pkg.github.com' | |
- name: Setup project | |
run: | | |
npm ci | |
- name: Lint and build code | |
run: | | |
npm run lint --workspace ${{ inputs.package }} | |
npm run build --workspace ${{ inputs.package }} | |
- name: Publish package ${{ inputs.package }} | |
env: | |
NODE_AUTH_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
run: | | |
npm version ${{ inputs.version }} --workspace ${{ inputs.package }} --no-commit-hooks --no-git-tag-version | |
npm publish --workspace ${{ inputs.package }} | |
- uses: stefanzweifel/git-auto-commit-action@v5 | |
with: | |
commit_message: Release v${{ inputs.version }} of ${{ inputs.package }} | |
tagging_message: v${{ inputs.version }}-${{ inputs.package }} |