Skip to content

Commit

Permalink
build(GitHub): Introduce an environment variable for the ORT version
Browse files Browse the repository at this point in the history
Switch from `github.ref` to `github.ref_name` to get the short name of
the Git ref (without e.g. a "refs/tags/" prefix, also see [1]) in order to
be able to directly use it as the ORT version and expose it as an
environment variable.

[1]: https://github.blog/changelog/2023-09-13-github-actions-updates-to-github_ref-and-github-ref/

Signed-off-by: Sebastian Schuberth <[email protected]>
  • Loading branch information
sschuberth committed Sep 18, 2023
1 parent af1cbfc commit 28b6e71
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,12 +13,14 @@ on:

jobs:
publish:
env:
ORT_VERSION: ${{ inputs.tag || github.ref_name }}
runs-on: ubuntu-22.04
steps:
- name: Checkout Repository
uses: actions/checkout@v4
with:
ref: ${{ inputs.tag || github.ref }}
ref: ${{ env.ORT_VERSION }}
- name: Setup Java
uses: actions/setup-java@v3
with:
Expand Down

0 comments on commit 28b6e71

Please sign in to comment.