Skip to content

Commit f153d07

Browse files
authored
Use github.ref instead of github.ref_name (#50)
* Use github.ref instead of github.ref_name * Use conditional instead
1 parent ac605bc commit f153d07

File tree

3 files changed

+9
-5
lines changed

3 files changed

+9
-5
lines changed

.github/workflows/build.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,7 @@ jobs:
8282
task python:base:copy-files IDENTIFIER=${{ matrix.identifier }} NBL_PYTHON_VERSION=${{ matrix.version }}
8383
fi
8484
task python:noteable:copy-files IDENTIFIER=${{ matrix.identifier }} NBL_PYTHON_VERSION=${{ matrix.version }}
85-
- run: scripts/set-variables.sh ${{ github.ref_name }} ${{ github.event_name }} ${{ github.event.pull_request.number }}
85+
- run: scripts/set-variables.sh ${{ github.ref_name || github.ref }} ${{ github.event_name }} ${{ github.event.pull_request.number }}
8686
- uses: docker/login-action@v2
8787
with:
8888
registry: ghcr.io
@@ -127,7 +127,7 @@ jobs:
127127
repo-token: ${{ github.token }}
128128
- run: |
129129
task r:base:copy-files NBL_LANGUAGE_VERSION=${{ matrix.version }}
130-
- run: scripts/set-variables.sh ${{ github.ref_name }} ${{ github.event_name }} ${{ github.event.pull_request.number }}
130+
- run: scripts/set-variables.sh ${{ github.ref_name || github.ref }} ${{ github.event_name }} ${{ github.event.pull_request.number }}
131131
- uses: docker/login-action@v2
132132
with:
133133
registry: ghcr.io
@@ -165,7 +165,7 @@ jobs:
165165
repo-token: ${{ github.token }}
166166
- run: |
167167
task rust:base:copy-files NBL_LANGUAGE_VERSION=${{ matrix.version }}
168-
- run: scripts/set-variables.sh ${{ github.ref_name }} ${{ github.event_name }} ${{ github.event.pull_request.number }}
168+
- run: scripts/set-variables.sh ${{ github.ref_name || github.ref }} ${{ github.event_name }} ${{ github.event.pull_request.number }}
169169
- uses: docker/login-action@v2
170170
with:
171171
registry: ghcr.io
@@ -203,7 +203,7 @@ jobs:
203203
repo-token: ${{ github.token }}
204204
- run: |
205205
task deno:base:copy-files NBL_LANGUAGE_VERSION=${{ matrix.version }}
206-
- run: scripts/set-variables.sh ${{ github.ref_name }} ${{ github.event_name }} ${{ github.event.pull_request.number }}
206+
- run: scripts/set-variables.sh ${{ github.ref_name || github.ref }} ${{ github.event_name }} ${{ github.event.pull_request.number }}
207207
- uses: docker/login-action@v2
208208
with:
209209
registry: ghcr.io

CHANGELOG.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,10 @@ All notable changes to this project will be documented in this file.
44
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
55
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
66

7+
## [0.0.2] - 2023-09-20
8+
### Fixed
9+
- Fixed variable generation on release pipelines
10+
711
## [0.0.1] - 2023-09-20
812
### Added
913
- Added automatic release creation via CHANGELOG

scripts/set-variables.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ fi
2424

2525
# If a release, we use the tag, otherwise we use the commit SHA
2626
if [[ "${EVENT}" == "release" ]]; then
27-
echo "TAG=${GITHUB_REF}" >> "${GITHUB_ENV}"
27+
echo "TAG=${REF}" >> "${GITHUB_ENV}"
2828
else
2929
echo "TAG=${GITHUB_SHA}" >> "${GITHUB_ENV}"
3030
fi

0 commit comments

Comments
 (0)