Skip to content

Commit fc3e84a

Browse files
committed
Fix create-release workflow
1 parent 36e4c85 commit fc3e84a

File tree

3 files changed

+17
-7
lines changed

3 files changed

+17
-7
lines changed

.github/workflows/build-and-test.yml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -125,4 +125,3 @@ jobs:
125125
- name: Build and Test
126126
run: |
127127
gradle clean installBuildTools build ${{ inputs.gradle_debug_params }}
128-

.github/workflows/create-release.yml

Lines changed: 12 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -75,8 +75,7 @@ jobs:
7575
fi
7676
7777
build_and_test:
78-
if: ${{ inputs['pypi-publish'] }}
79-
needs: check_pypi
78+
needs: details
8079
runs-on: ubuntu-latest
8180
steps:
8281
- uses: actions/checkout@v4
@@ -118,7 +117,9 @@ jobs:
118117
pypi_publish:
119118
if: ${{ inputs['pypi-publish'] }}
120119
name: Upload release to PyPI
121-
needs: build_and_test
120+
needs:
121+
- check_pypi
122+
- build_and_test
122123
runs-on: ubuntu-latest
123124
environment:
124125
name: release
@@ -135,18 +136,21 @@ jobs:
135136

136137
github_release:
137138
name: Create GitHub Release
138-
needs: details
139+
shell: bash
140+
needs: build_and_test
139141
runs-on: ubuntu-latest
140142
permissions:
141143
contents: write
144+
env:
145+
TAG: ${{ needs.details.outputs.tag_name }}
142146
steps:
143147
- name: Checkout Code
144148
uses: actions/checkout@v4
145149
with:
146150
fetch-depth: 0
147151
- name: Create Changelog
148152
id: change-log
149-
uses: yorevs/hspylib/.github/actions/changelog@master
153+
uses: HS-Teams/hspylib/.github/actions/changelog@master
150154
with:
151155
tag-name: ${{ needs.details.outputs.tag_name }}
152156
- name: Download artifacts
@@ -160,8 +164,10 @@ jobs:
160164
env:
161165
GH_TOKEN: ${{ github.token }}
162166
run: |
167+
set -euo pipefail
168+
: "${TAG:?missing tag_name output}"
163169
echo "${{ steps.change-log.outputs.changelog }}" > changelog
164170
[[ "${{ inputs['pypi-publish'] }}" == 'true' ]] && assets="dist/*"
165-
gh release create ${{ needs.details.outputs.tag_name }} \
171+
gh release create "${TAG}" \
166172
--title "${{ vars.PACKAGE_NAME }}-${{ needs.details.outputs.tag_name }}-rc${{ github.run_number }}" \
167173
--notes-file changelog ${assets}

src/demo/features/rag/x_refs_demo.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
import os
2+
13
from askai.core.router.evaluation import resolve_x_refs
24
from askai.core.support.shared_instances import shared
35
from askai.core.support.utilities import display_text
@@ -29,6 +31,9 @@
2931

3032
from tokenizers.decoders import DecodeStream
3133
from transformers import AutoTokenizer
34+
from huggingface_hub import login
35+
HF_TOKEN = os.getenv('HF_TOKEN')
36+
login(token=HF_TOKEN)
3237
tok = AutoTokenizer.from_pretrained('meta-llama/Meta-Llama-3-8B-Instruct')
3338
stream = DecodeStream(skip_special_tokens=False)
3439

0 commit comments

Comments
 (0)