From 28b6e71fc35f6ed96dc878f50db8d95aa3977056 Mon Sep 17 00:00:00 2001 From: Sebastian Schuberth Date: Mon, 18 Sep 2023 13:20:26 +0200 Subject: [PATCH] build(GitHub): Introduce an environment variable for the ORT version 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 --- .github/workflows/release.yml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 47a6306c934ee..2e133d7b11cd1 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -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: