Skip to content

Commit 1856510

Browse files
committed
ci: fix the attestation step
The path is incorrect because we meant to capture the value of `$PWD` before running `popd`.
1 parent 5b804f7 commit 1856510

File tree

2 files changed

+7
-11
lines changed

2 files changed

+7
-11
lines changed

.github/workflows/release.yml

Lines changed: 2 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -77,15 +77,7 @@ jobs:
7777

7878
- id: build
7979
run: |
80-
rustc --print cfg | grep = > rustc.vars
81-
source rustc.vars
82-
83-
if [ -z "${target_env}" ]; then
84-
export HOST="${target_arch}-${target_vendor}-${target_os}"
85-
else
86-
export HOST="${target_arch}-${target_vendor}-${target_os}-${target_env}"
87-
fi
88-
80+
export HOST=$(rustc -vV | grep host: | awk '{print $2}')
8981
if [ "$HOST" = "$TARGET" ]; then
9082
cargo build --release --target ${TARGET}
9183
else
@@ -100,9 +92,8 @@ jobs:
10092
tar cvzf $ASSET_NAME xsnippet-api
10193
fi
10294
gh release upload $RELEASE_TAG $ASSET_NAME
103-
popd
104-
10595
echo "asset_path=$PWD/$ASSET_NAME" >> $GITHUB_OUTPUT
96+
popd
10697
env:
10798
ASSET_NAME: ${{ matrix.name }}
10899
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}

.github/workflows/tests.yml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -93,6 +93,11 @@ jobs:
9393
run: |
9494
python -m alembic.config upgrade head
9595
96+
- id: debug
97+
run: |
98+
export TARGET=$(rustc -vV | grep host: | awk '{print $2}')
99+
cargo build --release --target ${TARGET}
100+
96101
- uses: actions-rs/cargo@v1
97102
with:
98103
command: test

0 commit comments

Comments
 (0)