mirror of
https://github.com/ClementTsang/bottom.git
synced 2025-07-22 05:04:39 +02:00
ci: move winget/msi and deb gen to separate steps (#585)
Moves debian and winget/msi generation to a separate job, so it can run in parallel to the other jobs.
This commit is contained in:
parent
b853aef752
commit
e20057b97c
163
.github/workflows/deployment.yml
vendored
163
.github/workflows/deployment.yml
vendored
@ -165,8 +165,6 @@ jobs:
|
|||||||
with:
|
with:
|
||||||
fetch-depth: 1
|
fetch-depth: 1
|
||||||
|
|
||||||
- uses: actions/setup-python@v2
|
|
||||||
|
|
||||||
- name: Get release download URL
|
- name: Get release download URL
|
||||||
uses: actions/download-artifact@v2
|
uses: actions/download-artifact@v2
|
||||||
with:
|
with:
|
||||||
@ -186,22 +184,6 @@ jobs:
|
|||||||
echo "Release upload url: ${{ env.RELEASE_UPLOAD_URL }}"
|
echo "Release upload url: ${{ env.RELEASE_UPLOAD_URL }}"
|
||||||
echo "Release version: ${{ env.RELEASE_VERSION }}"
|
echo "Release version: ${{ env.RELEASE_VERSION }}"
|
||||||
|
|
||||||
- name: Install Net-Framework-Core (Windows x86-64 MSVC)
|
|
||||||
if: matrix.triple.target == 'x86_64-pc-windows-msvc'
|
|
||||||
shell: powershell
|
|
||||||
run: Install-WindowsFeature Net-Framework-Core
|
|
||||||
|
|
||||||
- name: Install wixtoolset (Windows x86-64 MSVC)
|
|
||||||
if: matrix.triple.target == 'x86_64-pc-windows-msvc'
|
|
||||||
uses: crazy-max/ghaction-chocolatey@v1.4.0
|
|
||||||
with:
|
|
||||||
args: install -y wixtoolset
|
|
||||||
|
|
||||||
# - name: Export wixtoolset to path (Windows x86-64 MSVC)
|
|
||||||
# if: matrix.triple.target == 'x86_64-pc-windows-msvc'
|
|
||||||
# shell: powershell
|
|
||||||
# run: export PATH=${PATH}:"/c/Program Files (x86)/WiX Toolset v3.11/bin"
|
|
||||||
|
|
||||||
- name: Install toolchain
|
- name: Install toolchain
|
||||||
uses: actions-rs/toolchain@v1
|
uses: actions-rs/toolchain@v1
|
||||||
with:
|
with:
|
||||||
@ -272,16 +254,85 @@ jobs:
|
|||||||
name: artifacts
|
name: artifacts
|
||||||
path: artifacts
|
path: artifacts
|
||||||
|
|
||||||
- name: Build msi file (Windows x86-64 MSVC)
|
- name: Compress completion files (Linux x86-64 GNU)
|
||||||
if: matrix.triple.target == 'x86_64-pc-windows-msvc'
|
if: matrix.triple.target == 'x86_64-unknown-linux-gnu' && matrix.triple.container == ''
|
||||||
|
shell: bash
|
||||||
|
run: |
|
||||||
|
tar -C ./completion -czvf completion.tar.gz .
|
||||||
|
|
||||||
|
- name: Release completion files (Linux x86-64 GNU)
|
||||||
|
if: matrix.triple.target == 'x86_64-unknown-linux-gnu' && matrix.triple.container == ''
|
||||||
|
uses: actions/upload-release-asset@v1.0.1
|
||||||
|
env:
|
||||||
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||||
|
with:
|
||||||
|
upload_url: ${{ env.RELEASE_UPLOAD_URL }}
|
||||||
|
asset_path: completion.tar.gz
|
||||||
|
asset_name: completion.tar.gz
|
||||||
|
asset_content_type: application/octet-stream
|
||||||
|
|
||||||
|
build-msi:
|
||||||
|
name: build-msi
|
||||||
|
needs: [create-github-release]
|
||||||
|
runs-on: "windows-2019"
|
||||||
|
env:
|
||||||
|
RUST_BACKTRACE: 1
|
||||||
|
steps:
|
||||||
|
- name: Checkout repository
|
||||||
|
uses: actions/checkout@v2
|
||||||
|
with:
|
||||||
|
fetch-depth: 1
|
||||||
|
|
||||||
|
- uses: actions/setup-python@v2
|
||||||
|
|
||||||
|
- name: Get release download URL
|
||||||
|
uses: actions/download-artifact@v2
|
||||||
|
with:
|
||||||
|
name: artifacts
|
||||||
|
path: artifacts
|
||||||
|
|
||||||
|
- name: Set release upload URL and release version
|
||||||
|
shell: bash
|
||||||
|
run: |
|
||||||
|
release_upload_url="$(cat ./artifacts/release-upload-url)"
|
||||||
|
echo "RELEASE_UPLOAD_URL=$release_upload_url" >> $GITHUB_ENV
|
||||||
|
release_version="$(cat ./artifacts/release-version)"
|
||||||
|
echo "RELEASE_VERSION=$release_version" >> $GITHUB_ENV
|
||||||
|
|
||||||
|
- name: Validate release environment variables
|
||||||
|
run: |
|
||||||
|
echo "Release upload url: ${{ env.RELEASE_UPLOAD_URL }}"
|
||||||
|
echo "Release version: ${{ env.RELEASE_VERSION }}"
|
||||||
|
|
||||||
|
- name: Install Net-Framework-Core (Windows x86-64 MSVC)
|
||||||
|
shell: powershell
|
||||||
|
run: Install-WindowsFeature Net-Framework-Core
|
||||||
|
|
||||||
|
- name: Install wixtoolset (Windows x86-64 MSVC)
|
||||||
|
uses: crazy-max/ghaction-chocolatey@v1.4.0
|
||||||
|
with:
|
||||||
|
args: install -y wixtoolset
|
||||||
|
|
||||||
|
- name: Install toolchain
|
||||||
|
uses: actions-rs/toolchain@v1
|
||||||
|
with:
|
||||||
|
profile: minimal
|
||||||
|
toolchain: stable
|
||||||
|
override: true
|
||||||
|
target: x86_64-pc-windows-msvc
|
||||||
|
|
||||||
|
- uses: Swatinem/rust-cache@v1
|
||||||
|
with:
|
||||||
|
key: x86_64-pc-windows-msvc-msi
|
||||||
|
|
||||||
|
- name: Build msi file
|
||||||
shell: powershell
|
shell: powershell
|
||||||
run: |
|
run: |
|
||||||
cargo install cargo-wix --version 0.3.1 --locked
|
cargo install cargo-wix --version 0.3.1 --locked
|
||||||
cargo wix init
|
cargo wix init
|
||||||
cargo wix
|
cargo wix
|
||||||
|
|
||||||
- name: Upload msi file (Windows x86-64 MSVC)
|
- name: Upload msi file
|
||||||
if: matrix.triple.target == 'x86_64-pc-windows-msvc'
|
|
||||||
uses: actions/upload-release-asset@v1.0.1
|
uses: actions/upload-release-asset@v1.0.1
|
||||||
env:
|
env:
|
||||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||||
@ -291,15 +342,13 @@ jobs:
|
|||||||
asset_name: bottom_x86_64_installer.msi
|
asset_name: bottom_x86_64_installer.msi
|
||||||
asset_content_type: application/octet-stream
|
asset_content_type: application/octet-stream
|
||||||
|
|
||||||
- name: Build winget (Windows x86-64 MSVC)
|
- name: Build winget
|
||||||
if: matrix.triple.target == 'x86_64-pc-windows-msvc'
|
|
||||||
run: |
|
run: |
|
||||||
python "./deployment/packager.py" ${{ env.RELEASE_VERSION }} "./deployment/windows/winget/winget.yaml.template" "Clement.bottom.yaml" "SHA256" "./bottom_x86_64_installer.msi"
|
python "./deployment/packager.py" ${{ env.RELEASE_VERSION }} "./deployment/windows/winget/winget.yaml.template" "Clement.bottom.yaml" "SHA256" "./bottom_x86_64_installer.msi"
|
||||||
$Code = powershell ./deployment/windows/winget/get_product_code.ps1 ./bottom_x86_64_installer.msi
|
$Code = powershell ./deployment/windows/winget/get_product_code.ps1 ./bottom_x86_64_installer.msi
|
||||||
python "./deployment/windows/winget/product_code.py" Clement.bottom.yaml $Code
|
python "./deployment/windows/winget/product_code.py" Clement.bottom.yaml $Code
|
||||||
|
|
||||||
- name: Upload winget file (Windows x86-64 MSVC)
|
- name: Upload winget file
|
||||||
if: matrix.triple.target == 'x86_64-pc-windows-msvc'
|
|
||||||
uses: actions/upload-release-asset@v1.0.1
|
uses: actions/upload-release-asset@v1.0.1
|
||||||
env:
|
env:
|
||||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||||
@ -309,15 +358,56 @@ jobs:
|
|||||||
asset_name: Clement.bottom.yaml
|
asset_name: Clement.bottom.yaml
|
||||||
asset_content_type: application/octet-stream
|
asset_content_type: application/octet-stream
|
||||||
|
|
||||||
|
build-deb:
|
||||||
|
name: build-deb
|
||||||
|
needs: [create-github-release]
|
||||||
|
runs-on: "ubuntu-18.04"
|
||||||
|
env:
|
||||||
|
RUST_BACKTRACE: 1
|
||||||
|
steps:
|
||||||
|
- name: Checkout repository
|
||||||
|
uses: actions/checkout@v2
|
||||||
|
with:
|
||||||
|
fetch-depth: 1
|
||||||
|
|
||||||
|
- name: Get release download URL
|
||||||
|
uses: actions/download-artifact@v2
|
||||||
|
with:
|
||||||
|
name: artifacts
|
||||||
|
path: artifacts
|
||||||
|
|
||||||
|
- name: Set release upload URL and release version
|
||||||
|
shell: bash
|
||||||
|
run: |
|
||||||
|
release_upload_url="$(cat ./artifacts/release-upload-url)"
|
||||||
|
echo "RELEASE_UPLOAD_URL=$release_upload_url" >> $GITHUB_ENV
|
||||||
|
release_version="$(cat ./artifacts/release-version)"
|
||||||
|
echo "RELEASE_VERSION=$release_version" >> $GITHUB_ENV
|
||||||
|
|
||||||
|
- name: Validate release environment variables
|
||||||
|
run: |
|
||||||
|
echo "Release upload url: ${{ env.RELEASE_UPLOAD_URL }}"
|
||||||
|
echo "Release version: ${{ env.RELEASE_VERSION }}"
|
||||||
|
|
||||||
|
- name: Install toolchain
|
||||||
|
uses: actions-rs/toolchain@v1
|
||||||
|
with:
|
||||||
|
profile: minimal
|
||||||
|
toolchain: stable
|
||||||
|
override: true
|
||||||
|
target: x86_64-unknown-linux-gnu
|
||||||
|
|
||||||
|
- uses: Swatinem/rust-cache@v1
|
||||||
|
with:
|
||||||
|
key: x86_64-unknown-linux-gnu-deb
|
||||||
|
|
||||||
- name: Build Debian release (Linux x86-64 GNU)
|
- name: Build Debian release (Linux x86-64 GNU)
|
||||||
if: matrix.triple.target == 'x86_64-unknown-linux-gnu' && matrix.triple.container == ''
|
|
||||||
run: |
|
run: |
|
||||||
cargo install cargo-deb --version 1.29.0 --locked
|
cargo install cargo-deb --version 1.29.0 --locked
|
||||||
cargo deb
|
cargo deb
|
||||||
cp ./target/debian/bottom_*.deb ./bottom_${{ env.RELEASE_VERSION }}_amd64.deb
|
cp ./target/debian/bottom_*.deb ./bottom_${{ env.RELEASE_VERSION }}_amd64.deb
|
||||||
|
|
||||||
- name: Upload Debian file (Linux x86-64 GNU)
|
- name: Upload Debian file (Linux x86-64 GNU)
|
||||||
if: matrix.triple.target == 'x86_64-unknown-linux-gnu' && matrix.triple.container == ''
|
|
||||||
uses: actions/upload-release-asset@v1.0.1
|
uses: actions/upload-release-asset@v1.0.1
|
||||||
env:
|
env:
|
||||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||||
@ -372,20 +462,3 @@ jobs:
|
|||||||
asset_path: choco.zip
|
asset_path: choco.zip
|
||||||
asset_name: choco.zip
|
asset_name: choco.zip
|
||||||
asset_content_type: application/octet-stream
|
asset_content_type: application/octet-stream
|
||||||
|
|
||||||
- name: Compress completion files (Linux x86-64 GNU)
|
|
||||||
if: matrix.triple.target == 'x86_64-unknown-linux-gnu' && matrix.triple.container == ''
|
|
||||||
shell: bash
|
|
||||||
run: |
|
|
||||||
tar -C ./completion -czvf completion.tar.gz .
|
|
||||||
|
|
||||||
- name: Release completion files (Linux x86-64 GNU)
|
|
||||||
if: matrix.triple.target == 'x86_64-unknown-linux-gnu' && matrix.triple.container == ''
|
|
||||||
uses: actions/upload-release-asset@v1.0.1
|
|
||||||
env:
|
|
||||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
|
||||||
with:
|
|
||||||
upload_url: ${{ env.RELEASE_UPLOAD_URL }}
|
|
||||||
asset_path: completion.tar.gz
|
|
||||||
asset_name: completion.tar.gz
|
|
||||||
asset_content_type: application/octet-stream
|
|
||||||
|
188
.github/workflows/nightly.yml
vendored
188
.github/workflows/nightly.yml
vendored
@ -164,8 +164,6 @@ jobs:
|
|||||||
with:
|
with:
|
||||||
fetch-depth: 1
|
fetch-depth: 1
|
||||||
|
|
||||||
- uses: actions/setup-python@v2
|
|
||||||
|
|
||||||
- name: Get release download URL
|
- name: Get release download URL
|
||||||
uses: actions/download-artifact@v2
|
uses: actions/download-artifact@v2
|
||||||
with:
|
with:
|
||||||
@ -185,17 +183,6 @@ jobs:
|
|||||||
echo "Release upload url: ${{ env.RELEASE_UPLOAD_URL }}"
|
echo "Release upload url: ${{ env.RELEASE_UPLOAD_URL }}"
|
||||||
echo "Release version: ${{ env.RELEASE_VERSION }}"
|
echo "Release version: ${{ env.RELEASE_VERSION }}"
|
||||||
|
|
||||||
- name: Install Net-Framework-Core (Windows x86-64 MSVC)
|
|
||||||
if: matrix.triple.target == 'x86_64-pc-windows-msvc'
|
|
||||||
shell: powershell
|
|
||||||
run: Install-WindowsFeature Net-Framework-Core
|
|
||||||
|
|
||||||
- name: Install wixtoolset (Windows x86-64 MSVC)
|
|
||||||
if: matrix.triple.target == 'x86_64-pc-windows-msvc'
|
|
||||||
uses: crazy-max/ghaction-chocolatey@v1.4.0
|
|
||||||
with:
|
|
||||||
args: install -y wixtoolset
|
|
||||||
|
|
||||||
- name: Install toolchain
|
- name: Install toolchain
|
||||||
uses: actions-rs/toolchain@v1
|
uses: actions-rs/toolchain@v1
|
||||||
with:
|
with:
|
||||||
@ -245,8 +232,6 @@ jobs:
|
|||||||
tar -czvf bottom_${{ matrix.triple.target }}${{ matrix.triple.suffix }}.tar.gz btm completion
|
tar -czvf bottom_${{ matrix.triple.target }}${{ matrix.triple.suffix }}.tar.gz btm completion
|
||||||
echo "ASSET=bottom_${{ matrix.triple.target }}${{ matrix.triple.suffix }}.tar.gz" >> $GITHUB_ENV
|
echo "ASSET=bottom_${{ matrix.triple.target }}${{ matrix.triple.suffix }}.tar.gz" >> $GITHUB_ENV
|
||||||
|
|
||||||
# TODO: Move this elsewhere; do this all at once, and do not continue if any fails. Store artifacts. Do the same for deployment.
|
|
||||||
|
|
||||||
- name: Upload main release
|
- name: Upload main release
|
||||||
if: github.event.inputs.isMock != 'mock'
|
if: github.event.inputs.isMock != 'mock'
|
||||||
uses: actions/upload-release-asset@v1.0.1
|
uses: actions/upload-release-asset@v1.0.1
|
||||||
@ -259,49 +244,6 @@ jobs:
|
|||||||
asset_name: ${{ env.ASSET }}
|
asset_name: ${{ env.ASSET }}
|
||||||
asset_content_type: application/octet-stream
|
asset_content_type: application/octet-stream
|
||||||
|
|
||||||
- name: Build msi file (Windows x86-64 MSVC)
|
|
||||||
if: matrix.triple.target == 'x86_64-pc-windows-msvc'
|
|
||||||
shell: powershell
|
|
||||||
run: |
|
|
||||||
cargo install cargo-wix --version 0.3.1 --locked
|
|
||||||
cargo wix init
|
|
||||||
cargo wix
|
|
||||||
|
|
||||||
- name: Upload msi file (Windows x86-64 MSVC)
|
|
||||||
if: matrix.triple.target == 'x86_64-pc-windows-msvc' && github.event.inputs.isMock != 'mock'
|
|
||||||
uses: actions/upload-release-asset@v1.0.1
|
|
||||||
env:
|
|
||||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
|
||||||
with:
|
|
||||||
upload_url: ${{ env.RELEASE_UPLOAD_URL }}
|
|
||||||
asset_path: bottom_x86_64_installer.msi
|
|
||||||
asset_name: bottom_x86_64_installer.msi
|
|
||||||
asset_content_type: application/octet-stream
|
|
||||||
|
|
||||||
- name: Build Debian release (Linux x86-64 GNU)
|
|
||||||
if: matrix.triple.target == 'x86_64-unknown-linux-gnu' && matrix.triple.container == ''
|
|
||||||
run: |
|
|
||||||
cargo install cargo-deb --version 1.29.0 --locked
|
|
||||||
cargo deb
|
|
||||||
cp ./target/debian/bottom_*.deb ./bottom_${{ env.RELEASE_VERSION }}_amd64.deb
|
|
||||||
|
|
||||||
- name: Upload Debian file (Linux x86-64 GNU)
|
|
||||||
if: matrix.triple.target == 'x86_64-unknown-linux-gnu' && matrix.triple.container == '' && github.event.inputs.isMock != 'mock'
|
|
||||||
uses: actions/upload-release-asset@v1.0.1
|
|
||||||
env:
|
|
||||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
|
||||||
with:
|
|
||||||
upload_url: ${{ env.RELEASE_UPLOAD_URL }}
|
|
||||||
asset_path: bottom_${{ env.RELEASE_VERSION }}_amd64.deb
|
|
||||||
asset_name: bottom_${{ env.RELEASE_VERSION }}_amd64.deb
|
|
||||||
asset_content_type: application/octet-stream
|
|
||||||
|
|
||||||
- name: Compress completion files (Linux x86-64 GNU)
|
|
||||||
if: matrix.triple.target == 'x86_64-unknown-linux-gnu' && matrix.triple.container == ''
|
|
||||||
shell: bash
|
|
||||||
run: |
|
|
||||||
tar -C ./completion -czvf completion.tar.gz .
|
|
||||||
|
|
||||||
- name: Release completion files (Linux x86-64 GNU)
|
- name: Release completion files (Linux x86-64 GNU)
|
||||||
if: matrix.triple.target == 'x86_64-unknown-linux-gnu' && matrix.triple.container == '' && github.event.inputs.isMock != 'mock'
|
if: matrix.triple.target == 'x86_64-unknown-linux-gnu' && matrix.triple.container == '' && github.event.inputs.isMock != 'mock'
|
||||||
uses: actions/upload-release-asset@v1.0.1
|
uses: actions/upload-release-asset@v1.0.1
|
||||||
@ -312,3 +254,133 @@ jobs:
|
|||||||
asset_path: completion.tar.gz
|
asset_path: completion.tar.gz
|
||||||
asset_name: completion.tar.gz
|
asset_name: completion.tar.gz
|
||||||
asset_content_type: application/octet-stream
|
asset_content_type: application/octet-stream
|
||||||
|
|
||||||
|
build-msi:
|
||||||
|
name: build-msi
|
||||||
|
needs: [create-github-release]
|
||||||
|
runs-on: "windows-2019"
|
||||||
|
env:
|
||||||
|
RUST_BACKTRACE: 1
|
||||||
|
steps:
|
||||||
|
- name: Checkout repository
|
||||||
|
uses: actions/checkout@v2
|
||||||
|
with:
|
||||||
|
fetch-depth: 1
|
||||||
|
|
||||||
|
- name: Get release download URL
|
||||||
|
uses: actions/download-artifact@v2
|
||||||
|
with:
|
||||||
|
name: artifacts
|
||||||
|
path: artifacts
|
||||||
|
|
||||||
|
- name: Set release upload URL and release version
|
||||||
|
shell: bash
|
||||||
|
run: |
|
||||||
|
release_upload_url="$(cat ./artifacts/release-upload-url)"
|
||||||
|
echo "RELEASE_UPLOAD_URL=$release_upload_url" >> $GITHUB_ENV
|
||||||
|
release_version="$(cat ./artifacts/release-version)"
|
||||||
|
echo "RELEASE_VERSION=$release_version" >> $GITHUB_ENV
|
||||||
|
|
||||||
|
- name: Validate release environment variables
|
||||||
|
run: |
|
||||||
|
echo "Release upload url: ${{ env.RELEASE_UPLOAD_URL }}"
|
||||||
|
echo "Release version: ${{ env.RELEASE_VERSION }}"
|
||||||
|
|
||||||
|
- name: Install Net-Framework-Core
|
||||||
|
shell: powershell
|
||||||
|
run: Install-WindowsFeature Net-Framework-Core
|
||||||
|
|
||||||
|
- name: Install wixtoolset
|
||||||
|
uses: crazy-max/ghaction-chocolatey@v1.4.0
|
||||||
|
with:
|
||||||
|
args: install -y wixtoolset
|
||||||
|
|
||||||
|
- name: Install toolchain
|
||||||
|
uses: actions-rs/toolchain@v1
|
||||||
|
with:
|
||||||
|
profile: minimal
|
||||||
|
toolchain: stable
|
||||||
|
override: true
|
||||||
|
target: x86_64-pc-windows-msvc
|
||||||
|
|
||||||
|
- uses: Swatinem/rust-cache@v1
|
||||||
|
with:
|
||||||
|
key: x86_64-pc-windows-msvc-msi
|
||||||
|
|
||||||
|
- name: Build msi file
|
||||||
|
shell: powershell
|
||||||
|
run: |
|
||||||
|
cargo install cargo-wix --version 0.3.1 --locked
|
||||||
|
cargo wix init
|
||||||
|
cargo wix
|
||||||
|
|
||||||
|
- name: Upload msi file
|
||||||
|
if: github.event.inputs.isMock != 'mock'
|
||||||
|
uses: actions/upload-release-asset@v1.0.1
|
||||||
|
env:
|
||||||
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||||
|
with:
|
||||||
|
upload_url: ${{ env.RELEASE_UPLOAD_URL }}
|
||||||
|
asset_path: bottom_x86_64_installer.msi
|
||||||
|
asset_name: bottom_x86_64_installer.msi
|
||||||
|
asset_content_type: application/octet-stream
|
||||||
|
|
||||||
|
build-deb:
|
||||||
|
name: build-deb
|
||||||
|
needs: [create-github-release]
|
||||||
|
runs-on: "ubuntu-18.04"
|
||||||
|
env:
|
||||||
|
RUST_BACKTRACE: 1
|
||||||
|
steps:
|
||||||
|
- name: Checkout repository
|
||||||
|
uses: actions/checkout@v2
|
||||||
|
with:
|
||||||
|
fetch-depth: 1
|
||||||
|
|
||||||
|
- name: Get release download URL
|
||||||
|
uses: actions/download-artifact@v2
|
||||||
|
with:
|
||||||
|
name: artifacts
|
||||||
|
path: artifacts
|
||||||
|
|
||||||
|
- name: Set release upload URL and release version
|
||||||
|
shell: bash
|
||||||
|
run: |
|
||||||
|
release_upload_url="$(cat ./artifacts/release-upload-url)"
|
||||||
|
echo "RELEASE_UPLOAD_URL=$release_upload_url" >> $GITHUB_ENV
|
||||||
|
release_version="$(cat ./artifacts/release-version)"
|
||||||
|
echo "RELEASE_VERSION=$release_version" >> $GITHUB_ENV
|
||||||
|
|
||||||
|
- name: Validate release environment variables
|
||||||
|
run: |
|
||||||
|
echo "Release upload url: ${{ env.RELEASE_UPLOAD_URL }}"
|
||||||
|
echo "Release version: ${{ env.RELEASE_VERSION }}"
|
||||||
|
|
||||||
|
- name: Install toolchain
|
||||||
|
uses: actions-rs/toolchain@v1
|
||||||
|
with:
|
||||||
|
profile: minimal
|
||||||
|
toolchain: stable
|
||||||
|
override: true
|
||||||
|
target: x86_64-unknown-linux-gnu
|
||||||
|
|
||||||
|
- uses: Swatinem/rust-cache@v1
|
||||||
|
with:
|
||||||
|
key: x86_64-unknown-linux-gnu-deb
|
||||||
|
|
||||||
|
- name: Build Debian release
|
||||||
|
run: |
|
||||||
|
cargo install cargo-deb --version 1.29.0 --locked
|
||||||
|
cargo deb
|
||||||
|
cp ./target/debian/bottom_*.deb ./bottom_${{ env.RELEASE_VERSION }}_amd64.deb
|
||||||
|
|
||||||
|
- name: Upload Debian file if not mock
|
||||||
|
if: github.event.inputs.isMock != 'mock'
|
||||||
|
uses: actions/upload-release-asset@v1.0.1
|
||||||
|
env:
|
||||||
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||||
|
with:
|
||||||
|
upload_url: ${{ env.RELEASE_UPLOAD_URL }}
|
||||||
|
asset_path: bottom_${{ env.RELEASE_VERSION }}_amd64.deb
|
||||||
|
asset_name: bottom_${{ env.RELEASE_VERSION }}_amd64.deb
|
||||||
|
asset_content_type: application/octet-stream
|
||||||
|
10
Cargo.toml
10
Cargo.toml
@ -92,16 +92,20 @@ assets = [
|
|||||||
["target/release/btm", "usr/bin/", "755"],
|
["target/release/btm", "usr/bin/", "755"],
|
||||||
["LICENSE", "usr/share/doc/btm/", "644"],
|
["LICENSE", "usr/share/doc/btm/", "644"],
|
||||||
[
|
[
|
||||||
"completion/btm.bash",
|
"target/release/build/bottom-*/out/btm.bash",
|
||||||
"usr/share/bash-completion/completions/btm",
|
"usr/share/bash-completion/completions/btm",
|
||||||
"644",
|
"644",
|
||||||
],
|
],
|
||||||
[
|
[
|
||||||
"completion/btm.fish",
|
"target/release/build/bottom-*/out/btm.fish",
|
||||||
"usr/share/fish/vendor_completions.d/btm.fish",
|
"usr/share/fish/vendor_completions.d/btm.fish",
|
||||||
"644",
|
"644",
|
||||||
],
|
],
|
||||||
["completion/_btm", "usr/share/zsh/vendor-completions/", "644"],
|
[
|
||||||
|
"target/release/build/bottom-*/out/_btm",
|
||||||
|
"usr/share/zsh/vendor-completions/",
|
||||||
|
"644",
|
||||||
|
],
|
||||||
]
|
]
|
||||||
extended-description = """\
|
extended-description = """\
|
||||||
A cross-platform graphical process/system monitor with a customizable interface and a multitude of
|
A cross-platform graphical process/system monitor with a customizable interface and a multitude of
|
||||||
|
Loading…
x
Reference in New Issue
Block a user