Skip to content

Commit

Permalink
release workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
BoussonKarel committed Nov 15, 2022
1 parent a9fbe3e commit 84bbd64
Showing 1 changed file with 7 additions and 11 deletions.
18 changes: 7 additions & 11 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,20 +15,16 @@ jobs:
# only merged pull requests that begin with 'release/' or 'hotfix/' must trigger this job

steps:
- name: Extract version from branch name (for release branches)
if: startsWith(github.event.pull_request.head.ref, 'release/')
run: |
BRANCH_NAME="${{ github.event.pull_request.head.ref }}"
VERSION=${BRANCH_NAME#release/}
- uses: actions/checkout@v1

echo "RELEASE_VERSION=$VERSION" >> $GITHUB_ENV
- name: Read package.json
uses: dutscher/[email protected]
id: package-json-endpoint

- name: Extract version from branch name (for hotfix branches)
if: startsWith(github.event.pull_request.head.ref, 'hotfix/')
- name: Show version number
run: |
BRANCH_NAME="${{ github.event.pull_request.head.ref }}"
VERSION=${BRANCH_NAME#hotfix/}
BRANCH_NAME="${{ steps.package-json-endpoint.outputs.endpoint }}"
VERSION=${BRANCH_NAME#release/}
echo "RELEASE_VERSION=$VERSION" >> $GITHUB_ENV
- run: npm ci
Expand Down

0 comments on commit 84bbd64

Please sign in to comment.