2021-09-20 05:09:10 +00:00
|
|
|
# How we deploy a release. Covers binary builds. Also manages packaging for winget and choco.
|
2020-11-26 08:28:56 +00:00
|
|
|
#
|
2021-07-19 05:30:52 +00:00
|
|
|
# Based on https://github.com/BurntSushi/ripgrep/blob/master/.github/workflows/release.yml
|
2020-11-21 20:31:19 +00:00
|
|
|
|
|
|
|
name: deployment
|
|
|
|
|
|
|
|
on:
|
|
|
|
workflow_dispatch:
|
2020-11-26 08:28:56 +00:00
|
|
|
inputs:
|
|
|
|
tag:
|
2021-01-31 19:19:07 +00:00
|
|
|
description: "Which tag to deploy as:"
|
2020-11-26 08:28:56 +00:00
|
|
|
required: true
|
2020-11-22 09:18:47 +00:00
|
|
|
push:
|
2020-11-21 20:31:19 +00:00
|
|
|
tags:
|
2020-11-22 09:18:47 +00:00
|
|
|
- "[0-9]+.[0-9]+.[0-9]+"
|
2020-11-21 20:31:19 +00:00
|
|
|
|
|
|
|
jobs:
|
2021-10-09 06:29:17 +00:00
|
|
|
initialize-release-job:
|
|
|
|
name: initialize-release-job
|
2020-11-21 20:31:19 +00:00
|
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
|
|
|
- name: Get the release version from the tag
|
|
|
|
if: env.VERSION == ''
|
|
|
|
run: |
|
2020-11-26 08:28:56 +00:00
|
|
|
if [[ -n "${{ github.event.inputs.tag }}" ]]; then
|
|
|
|
echo "Manual run against a tag; overriding actual tag in the environment..."
|
|
|
|
echo "VERSION=${{ github.event.inputs.tag }}" >> $GITHUB_ENV
|
|
|
|
else
|
|
|
|
echo "VERSION=${GITHUB_REF#refs/tags/}" >> $GITHUB_ENV
|
|
|
|
fi
|
|
|
|
|
|
|
|
- name: Validate version environment variable
|
2020-11-22 17:40:29 +00:00
|
|
|
run: |
|
2020-11-26 08:28:56 +00:00
|
|
|
echo "Version being built against is version ${{ env.VERSION }}"!
|
2020-11-22 09:18:47 +00:00
|
|
|
|
2020-11-21 20:31:19 +00:00
|
|
|
- name: Save version number to artifact
|
2021-10-09 06:29:17 +00:00
|
|
|
run: echo "${{ env.VERSION }}" > release-version
|
2020-11-21 20:31:19 +00:00
|
|
|
|
2021-10-09 06:29:17 +00:00
|
|
|
- name: Upload release-version as artifact
|
|
|
|
uses: actions/upload-artifact@v2
|
2020-11-21 20:31:19 +00:00
|
|
|
with:
|
2021-10-09 06:29:17 +00:00
|
|
|
retention-days: 3
|
|
|
|
name: release-version
|
|
|
|
path: release-version
|
2020-11-21 20:31:19 +00:00
|
|
|
|
|
|
|
build-release:
|
|
|
|
name: build-release
|
2021-10-09 06:29:17 +00:00
|
|
|
needs: [initialize-release-job]
|
2020-11-21 20:31:19 +00:00
|
|
|
runs-on: ${{ matrix.triple.os }}
|
2021-05-13 02:53:18 +00:00
|
|
|
container: ${{ matrix.triple.container }}
|
2020-11-21 20:31:19 +00:00
|
|
|
env:
|
|
|
|
RUST_BACKTRACE: 1
|
|
|
|
strategy:
|
|
|
|
fail-fast: false
|
|
|
|
matrix:
|
|
|
|
triple:
|
|
|
|
# Standard x86-64 stuff, stable
|
|
|
|
- {
|
2021-05-12 01:04:24 +00:00
|
|
|
os: "ubuntu-18.04",
|
2020-11-21 20:31:19 +00:00
|
|
|
target: "x86_64-unknown-linux-gnu",
|
|
|
|
cross: false,
|
2021-07-31 20:24:16 +00:00
|
|
|
strip: true,
|
2020-11-21 20:31:19 +00:00
|
|
|
}
|
2021-05-13 02:53:18 +00:00
|
|
|
- {
|
|
|
|
os: "ubuntu-18.04",
|
|
|
|
target: "x86_64-unknown-linux-gnu",
|
|
|
|
cross: false,
|
|
|
|
container: quay.io/pypa/manylinux2014_x86_64,
|
|
|
|
suffix: "2-17",
|
2021-07-31 20:24:16 +00:00
|
|
|
strip: true,
|
2021-05-13 02:53:18 +00:00
|
|
|
}
|
2020-11-21 20:31:19 +00:00
|
|
|
- {
|
2021-05-12 01:04:24 +00:00
|
|
|
os: "ubuntu-18.04",
|
2020-11-21 20:31:19 +00:00
|
|
|
target: "i686-unknown-linux-gnu",
|
|
|
|
cross: true,
|
2021-07-31 20:24:16 +00:00
|
|
|
strip: true,
|
2020-11-21 20:31:19 +00:00
|
|
|
}
|
|
|
|
- {
|
|
|
|
os: "ubuntu-18.04",
|
|
|
|
target: "x86_64-unknown-linux-musl",
|
|
|
|
cross: false,
|
2021-07-31 20:24:16 +00:00
|
|
|
strip: true,
|
2020-11-21 20:31:19 +00:00
|
|
|
}
|
|
|
|
- {
|
|
|
|
os: "ubuntu-18.04",
|
|
|
|
target: "i686-unknown-linux-musl",
|
|
|
|
cross: true,
|
2021-07-31 20:24:16 +00:00
|
|
|
strip: true,
|
|
|
|
}
|
|
|
|
- {
|
|
|
|
os: "macOS-latest",
|
|
|
|
target: "x86_64-apple-darwin",
|
|
|
|
cross: false,
|
|
|
|
strip: true,
|
2020-11-21 20:31:19 +00:00
|
|
|
}
|
|
|
|
- {
|
|
|
|
os: "windows-2019",
|
|
|
|
target: "x86_64-pc-windows-msvc",
|
|
|
|
cross: false,
|
2021-07-31 20:24:16 +00:00
|
|
|
}
|
2021-10-09 06:29:17 +00:00
|
|
|
- { os: "windows-2019", target: "i686-pc-windows-msvc", cross: false }
|
2020-11-21 20:31:19 +00:00
|
|
|
- {
|
|
|
|
os: "windows-2019",
|
|
|
|
target: "x86_64-pc-windows-gnu",
|
|
|
|
cross: false,
|
|
|
|
}
|
|
|
|
|
|
|
|
# aarch64
|
|
|
|
- {
|
|
|
|
os: "ubuntu-18.04",
|
|
|
|
target: "aarch64-unknown-linux-gnu",
|
|
|
|
cross: true,
|
|
|
|
}
|
|
|
|
|
|
|
|
# armv7
|
|
|
|
- {
|
|
|
|
os: "ubuntu-18.04",
|
|
|
|
target: "armv7-unknown-linux-gnueabihf",
|
|
|
|
cross: true,
|
|
|
|
}
|
|
|
|
|
|
|
|
# PowerPC 64 LE
|
|
|
|
- {
|
|
|
|
os: "ubuntu-18.04",
|
|
|
|
target: "powerpc64le-unknown-linux-gnu",
|
|
|
|
cross: true,
|
|
|
|
}
|
|
|
|
|
2021-07-31 20:24:16 +00:00
|
|
|
# Risc-V 64gc
|
|
|
|
- {
|
|
|
|
os: "ubuntu-18.04",
|
|
|
|
target: "riscv64gc-unknown-linux-gnu",
|
|
|
|
cross: true,
|
|
|
|
}
|
|
|
|
|
2020-11-21 20:31:19 +00:00
|
|
|
steps:
|
|
|
|
- name: Checkout repository
|
|
|
|
uses: actions/checkout@v2
|
|
|
|
with:
|
|
|
|
fetch-depth: 1
|
|
|
|
|
|
|
|
- name: Install toolchain
|
2021-12-22 22:29:50 +00:00
|
|
|
uses: actions-rs/toolchain@88dc2356392166efad76775c878094f4e83ff746 # https://github.com/actions-rs/toolchain/commit/88dc2356392166efad76775c878094f4e83ff746
|
2020-11-21 20:31:19 +00:00
|
|
|
with:
|
|
|
|
profile: minimal
|
|
|
|
toolchain: stable
|
|
|
|
override: true
|
|
|
|
target: ${{ matrix.triple.target }}
|
|
|
|
|
2021-12-22 22:29:50 +00:00
|
|
|
- uses: Swatinem/rust-cache@842ef286fff290e445b90b4002cc9807c3669641 # 1.3.0
|
2021-07-31 20:24:16 +00:00
|
|
|
with:
|
|
|
|
key: ${{ matrix.triple.target }}
|
2021-07-27 22:59:17 +00:00
|
|
|
|
2020-11-21 20:31:19 +00:00
|
|
|
- name: Build
|
|
|
|
uses: actions-rs/cargo@v1
|
|
|
|
with:
|
|
|
|
command: build
|
2021-08-20 02:16:44 +00:00
|
|
|
args: --release --verbose --target=${{ matrix.triple.target }} --features "battery"
|
2020-11-21 20:31:19 +00:00
|
|
|
use-cross: ${{ matrix.triple.cross }}
|
|
|
|
|
2020-11-22 09:18:47 +00:00
|
|
|
- name: Move autocomplete to working directory
|
2020-11-21 20:31:19 +00:00
|
|
|
shell: bash
|
|
|
|
run: |
|
2021-09-12 20:16:05 +00:00
|
|
|
mkdir completion
|
|
|
|
cp -r ./target/${{ matrix.triple.target }}/release/build/bottom-*/out/. completion
|
2020-11-22 09:18:47 +00:00
|
|
|
|
|
|
|
- name: Strip release binary (macOS or Linux x86-64/i686)
|
2021-07-31 20:24:16 +00:00
|
|
|
if: matrix.triple.strip == true
|
2020-11-21 20:31:19 +00:00
|
|
|
run: |
|
2020-11-22 09:18:47 +00:00
|
|
|
strip target/${{ matrix.triple.target }}/release/btm
|
2020-11-21 20:31:19 +00:00
|
|
|
|
2020-11-28 20:37:06 +00:00
|
|
|
# TODO: Strip ARM
|
|
|
|
|
2020-11-21 20:31:19 +00:00
|
|
|
- name: Bundle release and completion (Windows)
|
2020-11-22 09:18:47 +00:00
|
|
|
if: matrix.triple.os == 'windows-2019'
|
2020-11-21 20:31:19 +00:00
|
|
|
shell: bash
|
|
|
|
run: |
|
2020-11-22 09:18:47 +00:00
|
|
|
cp target/${{ matrix.triple.target }}/release/btm.exe btm.exe
|
2021-06-21 23:56:59 +00:00
|
|
|
7z a bottom_${{ matrix.triple.target }}.zip "btm.exe"
|
|
|
|
7z a bottom_${{ matrix.triple.target }}.zip "completion"
|
2020-11-21 20:31:19 +00:00
|
|
|
echo "ASSET=bottom_${{ matrix.triple.target }}.zip" >> $GITHUB_ENV
|
|
|
|
|
|
|
|
- name: Bundle release and completion (Linux and macOS)
|
2020-11-22 09:18:47 +00:00
|
|
|
if: matrix.triple.os != 'windows-2019'
|
2020-11-21 20:31:19 +00:00
|
|
|
shell: bash
|
|
|
|
run: |
|
2020-11-22 09:18:47 +00:00
|
|
|
cp target/${{ matrix.triple.target }}/release/btm ./btm
|
2021-05-13 02:53:18 +00:00
|
|
|
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
|
2020-11-21 20:31:19 +00:00
|
|
|
|
2021-10-09 06:29:17 +00:00
|
|
|
- name: Create release directory for artifact, move file
|
|
|
|
shell: bash
|
|
|
|
run: |
|
|
|
|
mkdir release
|
|
|
|
mv ${{ env.ASSET }} release/
|
2020-11-27 15:50:25 +00:00
|
|
|
|
2021-09-23 23:13:13 +00:00
|
|
|
- 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 .
|
2021-10-09 06:29:17 +00:00
|
|
|
mv completion.tar.gz release/
|
2021-09-23 23:13:13 +00:00
|
|
|
|
2021-10-09 06:29:17 +00:00
|
|
|
- name: Save release as artifact
|
|
|
|
uses: actions/upload-artifact@v2
|
2021-09-23 23:13:13 +00:00
|
|
|
with:
|
2021-10-09 06:29:17 +00:00
|
|
|
retention-days: 3
|
|
|
|
name: release
|
|
|
|
path: release
|
2021-09-23 23:13:13 +00:00
|
|
|
|
|
|
|
build-msi:
|
|
|
|
name: build-msi
|
2021-10-09 06:29:17 +00:00
|
|
|
needs: [initialize-release-job]
|
2021-09-23 23:13:13 +00:00
|
|
|
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
|
|
|
|
|
2021-10-09 06:29:17 +00:00
|
|
|
- name: Get release version
|
2021-09-23 23:13:13 +00:00
|
|
|
uses: actions/download-artifact@v2
|
|
|
|
with:
|
2021-10-09 06:29:17 +00:00
|
|
|
name: release-version
|
|
|
|
path: release-version
|
2021-09-23 23:13:13 +00:00
|
|
|
|
2021-10-09 06:29:17 +00:00
|
|
|
- name: Set release version
|
2021-09-23 23:13:13 +00:00
|
|
|
shell: bash
|
|
|
|
run: |
|
2021-10-09 06:29:17 +00:00
|
|
|
release_version="$(cat ./release-version/release-version)"
|
2021-09-23 23:13:13 +00:00
|
|
|
echo "RELEASE_VERSION=$release_version" >> $GITHUB_ENV
|
|
|
|
|
2021-10-09 06:29:17 +00:00
|
|
|
- name: Validate release version
|
2021-09-23 23:13:13 +00:00
|
|
|
run: |
|
|
|
|
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)
|
2021-12-22 22:29:50 +00:00
|
|
|
uses: crazy-max/ghaction-chocolatey@87d06bbbd2cfb1835f1820042d356aef4875fb5f # 1.6.0
|
2021-09-23 23:13:13 +00:00
|
|
|
with:
|
|
|
|
args: install -y wixtoolset
|
|
|
|
|
|
|
|
- name: Install toolchain
|
2021-12-22 22:29:50 +00:00
|
|
|
uses: actions-rs/toolchain@88dc2356392166efad76775c878094f4e83ff746 # https://github.com/actions-rs/toolchain/commit/88dc2356392166efad76775c878094f4e83ff746
|
2021-09-23 23:13:13 +00:00
|
|
|
with:
|
|
|
|
profile: minimal
|
|
|
|
toolchain: stable
|
|
|
|
override: true
|
|
|
|
target: x86_64-pc-windows-msvc
|
|
|
|
|
2021-12-22 22:29:50 +00:00
|
|
|
- uses: Swatinem/rust-cache@842ef286fff290e445b90b4002cc9807c3669641 # 1.3.0
|
2021-09-23 23:13:13 +00:00
|
|
|
with:
|
|
|
|
key: x86_64-pc-windows-msvc-msi
|
|
|
|
|
|
|
|
- name: Build msi file
|
2020-11-21 20:31:19 +00:00
|
|
|
shell: powershell
|
|
|
|
run: |
|
2021-06-29 20:33:07 +00:00
|
|
|
cargo install cargo-wix --version 0.3.1 --locked
|
2020-11-22 09:18:47 +00:00
|
|
|
cargo wix init
|
|
|
|
cargo wix
|
2020-11-21 20:31:19 +00:00
|
|
|
|
2021-09-23 23:13:13 +00:00
|
|
|
- name: Build winget
|
2020-11-21 20:31:19 +00:00
|
|
|
run: |
|
2021-05-10 00:05:02 +00:00
|
|
|
python "./deployment/packager.py" ${{ env.RELEASE_VERSION }} "./deployment/windows/winget/winget.yaml.template" "Clement.bottom.yaml" "SHA256" "./bottom_x86_64_installer.msi"
|
2021-07-22 02:02:00 +00:00
|
|
|
$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
|
2020-11-21 20:31:19 +00:00
|
|
|
|
2021-10-09 06:29:17 +00:00
|
|
|
- name: Create release directory for artifact, move files
|
|
|
|
shell: bash
|
|
|
|
run: |
|
|
|
|
mkdir release
|
|
|
|
mv bottom_x86_64_installer.msi release/
|
|
|
|
mv Clement.bottom.yaml release/
|
|
|
|
|
|
|
|
- name: Save release as artifact
|
|
|
|
uses: actions/upload-artifact@v2
|
2020-11-21 20:31:19 +00:00
|
|
|
with:
|
2021-10-09 06:29:17 +00:00
|
|
|
retention-days: 3
|
|
|
|
name: release
|
|
|
|
path: release
|
2020-11-21 20:31:19 +00:00
|
|
|
|
2021-09-23 23:13:13 +00:00
|
|
|
build-deb:
|
|
|
|
name: build-deb
|
2021-10-09 06:29:17 +00:00
|
|
|
needs: [initialize-release-job]
|
2021-09-23 23:13:13 +00:00
|
|
|
runs-on: "ubuntu-18.04"
|
|
|
|
env:
|
|
|
|
RUST_BACKTRACE: 1
|
|
|
|
steps:
|
|
|
|
- name: Checkout repository
|
|
|
|
uses: actions/checkout@v2
|
|
|
|
with:
|
|
|
|
fetch-depth: 1
|
|
|
|
|
2021-10-09 06:29:17 +00:00
|
|
|
- name: Get release version
|
2021-09-23 23:13:13 +00:00
|
|
|
uses: actions/download-artifact@v2
|
|
|
|
with:
|
2021-10-09 06:29:17 +00:00
|
|
|
name: release-version
|
|
|
|
path: release-version
|
2021-09-23 23:13:13 +00:00
|
|
|
|
2021-10-09 06:29:17 +00:00
|
|
|
- name: Set release version
|
2021-09-23 23:13:13 +00:00
|
|
|
shell: bash
|
|
|
|
run: |
|
2021-10-09 06:29:17 +00:00
|
|
|
release_version="$(cat ./release-version/release-version)"
|
2021-09-23 23:13:13 +00:00
|
|
|
echo "RELEASE_VERSION=$release_version" >> $GITHUB_ENV
|
|
|
|
|
2021-10-09 06:29:17 +00:00
|
|
|
- name: Validate release version
|
2021-09-23 23:13:13 +00:00
|
|
|
run: |
|
|
|
|
echo "Release version: ${{ env.RELEASE_VERSION }}"
|
|
|
|
|
|
|
|
- name: Install toolchain
|
2021-12-22 22:29:50 +00:00
|
|
|
uses: actions-rs/toolchain@88dc2356392166efad76775c878094f4e83ff746 # https://github.com/actions-rs/toolchain/commit/88dc2356392166efad76775c878094f4e83ff746
|
2021-09-23 23:13:13 +00:00
|
|
|
with:
|
|
|
|
profile: minimal
|
|
|
|
toolchain: stable
|
|
|
|
override: true
|
|
|
|
target: x86_64-unknown-linux-gnu
|
|
|
|
|
2021-12-22 22:29:50 +00:00
|
|
|
- uses: Swatinem/rust-cache@842ef286fff290e445b90b4002cc9807c3669641 # 1.3.0
|
2021-09-23 23:13:13 +00:00
|
|
|
with:
|
|
|
|
key: x86_64-unknown-linux-gnu-deb
|
|
|
|
|
2021-12-27 21:49:15 +00:00
|
|
|
- name: Build
|
|
|
|
uses: actions-rs/cargo@v1
|
|
|
|
with:
|
|
|
|
command: build
|
|
|
|
args: --release --verbose --features "battery"
|
|
|
|
|
|
|
|
- name: Move autocomplete to working directory
|
|
|
|
shell: bash
|
|
|
|
run: |
|
|
|
|
mkdir completion
|
|
|
|
cp -r ./target/release/build/bottom-*/out/. completion
|
|
|
|
|
|
|
|
- name: Build Debian release
|
2020-11-21 20:31:19 +00:00
|
|
|
run: |
|
2021-12-27 21:49:15 +00:00
|
|
|
cargo install cargo-deb --version 1.34.0 --locked
|
|
|
|
cargo deb --no-build
|
2020-11-21 20:31:19 +00:00
|
|
|
cp ./target/debian/bottom_*.deb ./bottom_${{ env.RELEASE_VERSION }}_amd64.deb
|
|
|
|
|
2021-12-31 01:48:56 +00:00
|
|
|
- name: Test Debian release
|
|
|
|
run: sudo dpkg -i ./bottom_${{ env.RELEASE_VERSION }}_amd64.deb
|
|
|
|
|
2021-10-09 06:29:17 +00:00
|
|
|
- name: Create release directory for artifact, move file
|
|
|
|
shell: bash
|
|
|
|
run: |
|
|
|
|
mkdir release
|
|
|
|
mv bottom_${{ env.RELEASE_VERSION }}_amd64.deb release/
|
|
|
|
|
|
|
|
- name: Save release as artifact
|
|
|
|
uses: actions/upload-artifact@v2
|
2020-11-21 20:31:19 +00:00
|
|
|
with:
|
2021-10-09 06:29:17 +00:00
|
|
|
retention-days: 3
|
|
|
|
name: release
|
|
|
|
path: release
|
2020-11-21 20:31:19 +00:00
|
|
|
|
2021-10-09 06:29:17 +00:00
|
|
|
generate-choco:
|
2020-11-26 05:07:38 +00:00
|
|
|
needs: [build-release]
|
2021-10-09 06:29:17 +00:00
|
|
|
name: generate-choco
|
2020-11-26 05:07:38 +00:00
|
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
|
|
|
- name: Checkout repository
|
|
|
|
uses: actions/checkout@v2
|
|
|
|
with:
|
|
|
|
fetch-depth: 1
|
|
|
|
|
|
|
|
- uses: actions/setup-python@v2
|
|
|
|
|
2021-10-09 06:29:17 +00:00
|
|
|
- name: Get release version
|
2020-11-26 05:07:38 +00:00
|
|
|
uses: actions/download-artifact@v2
|
|
|
|
with:
|
2021-10-09 06:29:17 +00:00
|
|
|
name: release-version
|
|
|
|
path: release-version
|
2020-11-26 05:07:38 +00:00
|
|
|
|
2021-10-09 06:29:17 +00:00
|
|
|
- name: Set release version
|
2020-11-26 05:07:38 +00:00
|
|
|
shell: bash
|
|
|
|
run: |
|
2021-10-09 06:29:17 +00:00
|
|
|
release_version="$(cat ./release-version/release-version)"
|
2020-11-26 05:07:38 +00:00
|
|
|
echo "RELEASE_VERSION=$release_version" >> $GITHUB_ENV
|
|
|
|
|
2021-10-09 06:29:17 +00:00
|
|
|
- name: Validate release version
|
2020-11-26 05:07:38 +00:00
|
|
|
run: |
|
2020-11-26 08:28:56 +00:00
|
|
|
echo "Release version: ${{ env.RELEASE_VERSION }}"
|
2020-11-26 05:07:38 +00:00
|
|
|
|
2021-10-09 06:29:17 +00:00
|
|
|
- name: Get release artifacts
|
|
|
|
uses: actions/download-artifact@v2
|
|
|
|
with:
|
|
|
|
name: release
|
|
|
|
path: release
|
|
|
|
|
2020-11-26 05:07:38 +00:00
|
|
|
- name: Execute choco packaging script
|
|
|
|
run: |
|
2021-12-19 18:56:54 +00:00
|
|
|
python "./deployment/windows/choco/choco_packager.py" "./release/bottom_i686-pc-windows-msvc.zip" "./release/bottom_x86_64-pc-windows-msvc.zip" ${{ env.RELEASE_VERSION }} "./deployment/windows/choco/bottom.nuspec.template" "./deployment/windows/choco/chocolateyinstall.ps1.template" "bottom.nuspec" "tools/chocolateyinstall.ps1" "tools/"
|
2020-11-26 05:07:38 +00:00
|
|
|
zip -r choco.zip "bottom.nuspec" "tools"
|
|
|
|
|
2021-10-09 06:29:17 +00:00
|
|
|
- name: Move release file into release directory
|
|
|
|
shell: bash
|
|
|
|
run: |
|
|
|
|
mv choco.zip release/
|
|
|
|
|
|
|
|
- name: Save release as artifact
|
|
|
|
uses: actions/upload-artifact@v2
|
|
|
|
with:
|
|
|
|
retention-days: 3
|
|
|
|
name: release
|
|
|
|
path: release
|
|
|
|
|
|
|
|
upload-release:
|
|
|
|
name: upload-release
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
needs: [generate-choco, build-deb, build-msi]
|
|
|
|
steps:
|
|
|
|
- name: Get release version
|
|
|
|
uses: actions/download-artifact@v2
|
|
|
|
with:
|
|
|
|
name: release-version
|
|
|
|
path: release-version
|
|
|
|
|
|
|
|
- name: Set release version
|
|
|
|
shell: bash
|
|
|
|
run: |
|
|
|
|
release_version="$(cat ./release-version/release-version)"
|
|
|
|
echo "RELEASE_VERSION=$release_version" >> $GITHUB_ENV
|
|
|
|
|
|
|
|
- name: Validate release version
|
|
|
|
run: |
|
|
|
|
echo "Release version: ${{ env.RELEASE_VERSION }}"
|
|
|
|
|
|
|
|
- name: Get release artifacts
|
|
|
|
uses: actions/download-artifact@v2
|
|
|
|
with:
|
|
|
|
name: release
|
|
|
|
path: release
|
|
|
|
|
|
|
|
- name: Print out all release files
|
|
|
|
run: |
|
|
|
|
echo "Generated $(ls ./release | wc -l) files:"
|
|
|
|
ls ./release
|
|
|
|
|
|
|
|
- name: Upload all saved release files
|
2021-12-22 22:29:50 +00:00
|
|
|
uses: softprops/action-gh-release@17cd0d34deddf848fc0e7d9be5202c148c270a0a # 0.1.14
|
2020-11-26 05:07:38 +00:00
|
|
|
with:
|
2021-10-09 06:29:17 +00:00
|
|
|
token: ${{ secrets.GITHUB_TOKEN }}
|
|
|
|
prerelease: false
|
|
|
|
tag_name: ${{ env.RELEASE_VERSION }}
|
|
|
|
draft: true
|
|
|
|
fail_on_unmatched_files: true
|
|
|
|
name: ${{ env.RELEASE_VERSION }} Release
|
|
|
|
body: |
|
|
|
|
<!-- Write summary here -->
|
2021-12-19 18:56:54 +00:00
|
|
|
|
2021-10-09 06:29:17 +00:00
|
|
|
---
|
|
|
|
|
|
|
|
## Features
|
|
|
|
|
|
|
|
## Changes
|
|
|
|
|
|
|
|
## Bug Fixes
|
|
|
|
|
|
|
|
## Internal Changes
|
|
|
|
files: |
|
|
|
|
./release/*
|