Skip to content

Commit 319c735

Browse files
committed
chore(ci); get branch name in release workflow
1 parent 9eef27f commit 319c735

1 file changed

Lines changed: 7 additions & 2 deletions

File tree

.github/workflows/release.yml

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -69,14 +69,19 @@ jobs:
6969
- name: Install dependencies
7070
run: npm ci
7171

72+
- name: Current Branch name
73+
run: |
74+
echo ${{ GITHUB_REF##*/ }}
75+
echo ${{ github.head_ref || github.ref_name }}
76+
7277
- name: 🧪 Dry-Run - GitHub Release
7378
if: ${{ inputs.dryrun == true }}
7479
env:
7580
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
7681
run: |
7782
git config --global user.name "${{ github.actor }}"
7883
git config --global user.email "${{ github.actor }}@users.noreply.github.com"
79-
npm run release:ci -- --semver ${{ inputs.semver }} --branch ${{ github.ref }} --create-release github --yes --dry-run
84+
npm run release:ci -- --semver ${{ inputs.semver }} --branch ${GITHUB_REF##*/} --create-release github --yes --dry-run
8085
8186
- name: GitHub Release 🏷️ / NPM Publish 📦
8287
if: ${{ inputs.dryrun != true }}
@@ -85,7 +90,7 @@ jobs:
8590
run: |
8691
git config --global user.name "${{ github.actor }}"
8792
git config --global user.email "${{ github.actor }}@users.noreply.github.com"
88-
npm run release:ci -- --semver ${{ inputs.semver }} --branch ${{ github.ref }} --create-release github --yes
93+
npm run release:ci -- --semver ${{ inputs.semver }} --branch ${GITHUB_REF##*/} --create-release github --yes
8994
9095
- name: Verbose Git Push Diagnostics
9196
env:

0 commit comments

Comments
 (0)