ci: remove git hash and nightly tag from deb file name (#970)
* ci: switch deb nightly builds back to the same string as normal Easier to stay consistent, I guess. * disable cache for cargo deb * reenable cache * nvm
This commit is contained in:
parent
f415fb08bc
commit
6e2b276836
|
@ -330,15 +330,16 @@ jobs:
|
|||
toolchain: stable
|
||||
target: ${{ matrix.info.target }}
|
||||
|
||||
- name: Enable Rust cache
|
||||
if: matrix.info.cross != true
|
||||
timeout-minutes: 5
|
||||
continue-on-error: true
|
||||
uses: Swatinem/rust-cache@359a70e43a0bb8a13953b04a90f76428b4959bb6 # 2.2.0
|
||||
with:
|
||||
shared-key: build-cache-${{ matrix.info.target }}
|
||||
save-if: "false"
|
||||
# - name: Enable Rust cache
|
||||
# if: matrix.info.cross != true
|
||||
# timeout-minutes: 5
|
||||
# continue-on-error: true
|
||||
# uses: Swatinem/rust-cache@359a70e43a0bb8a13953b04a90f76428b4959bb6 # 2.2.0
|
||||
# with:
|
||||
# shared-key: build-cache-${{ matrix.info.target }}
|
||||
# save-if: "false"
|
||||
|
||||
# TODO: Could I use the previous jobs to skip this call?
|
||||
- name: Build
|
||||
uses: ClementTsang/cargo-action@v0.0.3
|
||||
env:
|
||||
|
@ -360,28 +361,13 @@ jobs:
|
|||
run: |
|
||||
gzip ./manpage/btm.1
|
||||
|
||||
- name: Prepare custom version if needed
|
||||
if: ${{ inputs.caller == 'nightly' }}
|
||||
id: custom-version
|
||||
run: |
|
||||
if [[ ${{ matrix.info.cross }} == false ]]; then
|
||||
# x86-64 can be directly executed, so we can do the easy way out.
|
||||
VERSION=$(./target/${{ matrix.info.target }}/release/btm -V | awk '{print $2}')
|
||||
echo "CUSTOM_VERSION_ARG='--deb-version=$VERSION'" >> $GITHUB_OUTPUT
|
||||
else
|
||||
VER=$(grep -m1 "^version" Cargo.toml | awk '{print $3}' | tr -d \") # NB: Assumes the first instance of version is the build version
|
||||
APPEND=nightly-${GITHUB_SHA::8}
|
||||
echo "CUSTOM_VERSION_ARG='--deb-version=$VER-$APPEND'" >> $GITHUB_OUTPUT
|
||||
fi
|
||||
|
||||
- name: Build Debian release (x86-64)
|
||||
if: matrix.info.cross == false
|
||||
env:
|
||||
BTM_GENERATE: true
|
||||
run: |
|
||||
cargo install cargo-deb --version 1.41.3 --locked
|
||||
VERSION_ARG=$(echo ${{ steps.custom-version.outputs.CUSTOM_VERSION_ARG }} | tr -d \')
|
||||
cargo deb --no-build --target ${{ matrix.info.target }} $VERSION_ARG
|
||||
cargo deb --no-build --target ${{ matrix.info.target }}
|
||||
cp ./target/${{ matrix.info.target }}/debian/bottom_*.deb .
|
||||
|
||||
- name: Build Debian release (ARM)
|
||||
|
@ -390,8 +376,7 @@ jobs:
|
|||
BTM_GENERATE: true
|
||||
run: |
|
||||
docker pull ${{ matrix.info.container }}
|
||||
VERSION_ARG=$(echo ${{ steps.custom-version.outputs.CUSTOM_VERSION_ARG }} | tr -d \')
|
||||
docker run -t --rm --mount type=bind,source="$(pwd)",target=/volume ${{ matrix.info.container }} "--no-build --variant ${{ matrix.info.dpkg }} --target ${{ matrix.info.target }} $VERSION_ARG" "/volume"
|
||||
docker run -t --rm --mount type=bind,source="$(pwd)",target=/volume ${{ matrix.info.container }} "--no-build --variant ${{ matrix.info.dpkg }} --target ${{ matrix.info.target }}" "/volume"
|
||||
cp ./target/${{ matrix.info.target }}/debian/bottom-*.deb .
|
||||
TMP_NAME=$(find bottom-*.deb)
|
||||
VERSION=${{ matrix.info.dpkg }}
|
||||
|
|
Loading…
Reference in New Issue