Skip to content

Commit

Permalink
fix: test the workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
huniafatima-arbi committed Jul 31, 2024
1 parent e42ba89 commit 32ca135
Showing 1 changed file with 26 additions and 7 deletions.
33 changes: 26 additions & 7 deletions .github/workflows/next-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,30 @@
name: Comment release expected version

on:
push:
branches:
- master
pull_request:

pull_request:
branches:
- main

jobs:
version-check:
uses: huniafatima-arbi/.github/.github/workflows/expected-release-version.yml@huniafatima/release-expected-version-workflow
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 }}"

0 comments on commit 32ca135

Please sign in to comment.