Allow package versions to be manually published as pre-releases for a selected branch #12
Workflow file for this run
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: Manual trigger | |
on: | |
pull_request: | |
workflow_dispatch: | |
inputs: | |
name: | |
description: 'Who to greet' | |
default: 'World' | |
jobs: | |
hello: | |
runs-on: ubuntu-latest | |
steps: | |
- name: 'Checkout' | |
uses: actions/checkout@v4 | |
with: | |
fetch-depth: 0 # Checkout all branches and tags, needed for publish | |
- name: branch | |
run: echo "Hello ${{ github.ref_name }} " | |
- name: head ref | |
run: echo "Hello ${{ github.head_ref }} " | |
- name: ref | |
run: echo "$GITHUB_REF" | |
- name: sha | |
run: echo "Hello ${{ github.sha }} " | |
- name: lerna branch | |
run: git rev-parse --abbrev-ref HEAD | |
- name: test lerna version | |
run: npx lerna version --conventional-commits --conventional-prerelease --exact --force-publish --preid prerelease-$(date +%Y%m%dT%H%M)-$(git rev-parse HEAD | cut -c1-7) --no-changelog --no-push --no-private --no-git-tag-version --no-push --yes --allow-branch feature/publish-manual-workflow | |
# - name: 'set env' | |
# id: github_branch | |
# run: | | |
# echo "CURRENT_BRANCH=${{ github.head_ref || github.ref_name }}" >> "$GITHUB_OUTPUT" | |
# - name: branch name | |
# run: echo $ {{ steps.changed_packages.outputs.CURRENT_BRANCH }} |