chore: test the workflow #6
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
# Comment next release | |
name: Comment release expected version | |
on: | |
pull_request: | |
branches: | |
- master | |
jobs: | |
pre-release: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v3 | |
with : | |
fetch-depth: 0 | |
ref: ${{ github.head_ref }} | |
- name: Setup Node.js environment | |
uses: actions/setup-node@v3 | |
- name: Semantic Release dry run | |
id: semantic | |
run: | | |
OUTPUT=$(unset GITHUB_ACTIONS && npx semantic-release --dry-run --no-ci --branches "${{ github.head_ref }}") | |
VERSION=$(echo "$OUTPUT" | grep -o "The next release version is [0-9]*\.[0-9]*\.[0-9]*" | awk '{print $6}') | |
echo "::set-output name=version::$VERSION" | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
- name: Use the version | |
run: echo "The version is ${{ steps.semantic.outputs.version }}" |