summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorClement Tsang <34804052+ClementTsang@users.noreply.github.com>2023-01-12 06:23:36 -0500
committerGitHub <noreply@github.com>2023-01-12 06:23:36 -0500
commit6e2b276836a04b4c087fb6f636bb82b50d237c02 (patch)
tree150ad969abfe251433ebc2d49970d5da0dcb32b4
parentf415fb08bcf4d7cd879f10ecc6cd1340bf17518e (diff)
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
-rw-r--r--.github/workflows/build_releases.yml39
1 files changed, 12 insertions, 27 deletions
diff --git a/.github/workflows/build_releases.yml b/.github/workflows/build_releases.yml
index 70f87280..e19adc60 100644
--- a/.github/workflows/build_releases.yml
+++ b/.github/workflows/build_releases.yml
@@ -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 }}