diff options
author | Tim Oram <dev@mitmaro.ca> | 2023-07-15 19:51:09 -0230 |
---|---|---|
committer | Tim Oram <dev@mitmaro.ca> | 2023-07-15 22:31:57 -0230 |
commit | 7a56f3d42a1202e424614a89c2524b6127df2162 (patch) | |
tree | ce85b6c0f7b4214baae8a36987044102b62c600d | |
parent | cd480fc11e81f16c872628e0d5d309f1790d923c (diff) |
Update release workflow with latest debian/ubuntu
Also address a few issues with the release workflow that would have
resulted in failures.
-rw-r--r-- | .github/workflows/release-latest.yml | 13 | ||||
-rw-r--r-- | .github/workflows/release.yml | 89 |
2 files changed, 38 insertions, 64 deletions
diff --git a/.github/workflows/release-latest.yml b/.github/workflows/release-latest.yml index 602ae94..c3efbb0 100644 --- a/.github/workflows/release-latest.yml +++ b/.github/workflows/release-latest.yml @@ -15,13 +15,18 @@ jobs: REPOSITORY: "MitMaro/git-interactive-rebase-tool" steps: - uses: actions/checkout@v3 - - uses: dtolnay/rust-toolchain@stable - uses: Swatinem/rust-cache@v2 - name: "System Setup" run: | - sudo apt-get update || true; - sudo apt-get --assume-yes -f install curl build-essential pkg-config liblzma-dev; - cargo install --force cargo-deb + apt-get update; + apt-get --assume-yes -f install curl build-essential pkg-config; + env: + DEBIAN_FRONTEND: noninteractive + TZ: "America/St_Johns" + - uses: dtolnay/rust-toolchain@stable + - uses: baptiste0928/cargo-install@v1 + with: + crate: cargo-deb - name: "Build Deb" run: cargo +stable deb --output "target/debian/git-interactive-rebase-tool-ubuntu_amd64.deb" -- --features dev - name: Upload diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 8e9c506..eb9cca8 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -25,15 +25,16 @@ jobs: echo "$ref"; echo "::set-output name=name::$ref" - uses: actions/checkout@v3 + # manually install and use rustup, since dtolnay/rust-toolchain is not supported on older versions of Ubuntu - name: "System Setup" run: | - apt-get update; - apt-get --assume-yes -f install curl build-essential pkg-config; - curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- --default-toolchain stable -y; - $HOME/.cargo/bin/cargo install --force cargo-deb + apt-get update; + apt-get --assume-yes -f install curl build-essential pkg-config; + curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- --default-toolchain stable -y; + $HOME/.cargo/bin/cargo install --force cargo-deb env: - DEBIAN_FRONTEND: noninteractive - TZ: "America/St_Johns" + DEBIAN_FRONTEND: noninteractive + TZ: "America/St_Johns" - name: "Build Deb" run: $HOME/.cargo/bin/cargo +stable deb --output "target/debian/git-interactive-rebase-tool-${{ steps.ref.outputs.name }}-ubuntu-${{ matrix.version }}_amd64.deb" - name: "Upload Release" @@ -46,7 +47,7 @@ jobs: build-ubuntu: strategy: matrix: - version: ['18.04', '20.04', '22.04'] + version: ['18.04', '20.04', '22.04', '22.10', '23.04'] runs-on: ubuntu-latest timeout-minutes: 10 container: @@ -65,13 +66,15 @@ jobs: - uses: actions/checkout@v3 - name: "System Setup" run: | - apt-get update; - apt-get --assume-yes -f install curl build-essential pkg-config liblzma-dev; - curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- --default-toolchain stable -y; - $HOME/.cargo/bin/cargo install --force cargo-deb + apt-get update; + apt-get --assume-yes -f install curl build-essential pkg-config; env: - DEBIAN_FRONTEND: noninteractive - TZ: "America/St_Johns" + DEBIAN_FRONTEND: noninteractive + TZ: "America/St_Johns" + - uses: dtolnay/rust-toolchain@stable + - uses: baptiste0928/cargo-install@v1 + with: + crate: cargo-deb - name: "Build Deb" run: $HOME/.cargo/bin/cargo +stable deb --output "target/debian/git-interactive-rebase-tool-${{ steps.ref.outputs.name }}-ubuntu-${{ matrix.version }}_amd64.deb" - name: "Upload Release" @@ -82,48 +85,10 @@ jobs: env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - build-debian-legacy: - strategy: - matrix: - version: ['8'] - runs-on: ubuntu-latest - timeout-minutes: 10 - container: - image: 'docker://debian:${{ matrix.version }}-slim' - steps: - - name: "Get Tag Name" - id: ref - shell: bash - run: | - ref="${{ github.ref }}"; - ref="${ref//refs\/heads\//}"; - ref="${ref//refs\/tags\//}"; - ref="${ref//master/dev}"; - echo "$ref"; - echo "::set-output name=name::$ref" - - uses: actions/checkout@v3 - - name: "System Setup" - run: | - apt-get update; - apt-get --assume-yes -f install curl build-essential pkg-config; - curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- --default-toolchain stable -y; - $HOME/.cargo/bin/cargo install --force cargo-deb - env: - DEBIAN_FRONTEND: noninteractive - TZ: "America/St_Johns" - - name: "Build Deb" - run: $HOME/.cargo/bin/cargo +stable deb --output "target/debian/git-interactive-rebase-tool-${{ steps.ref.outputs.name }}-debian-${{ matrix.version }}_amd64.deb" - - name: "Upload Release" - uses: softprops/action-gh-release@v1 - with: - files: | - target/debian/*.deb - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} build-debian: strategy: matrix: - version: ['9', '10', 'bullseye', 'sid'] + version: ['10', '11', '12', 'sid'] runs-on: ubuntu-latest timeout-minutes: 10 container: @@ -142,13 +107,15 @@ jobs: - uses: actions/checkout@v3 - name: "System Setup" run: | - apt-get update; - apt-get --assume-yes -f install curl build-essential pkg-config liblzma-dev; - curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- --default-toolchain stable -y; - $HOME/.cargo/bin/cargo install --force cargo-deb + apt-get update; + apt-get --assume-yes -f install curl build-essential pkg-config; env: - DEBIAN_FRONTEND: noninteractive - TZ: "America/St_Johns" + DEBIAN_FRONTEND: noninteractive + TZ: "America/St_Johns" + - uses: dtolnay/rust-toolchain@stable + - uses: baptiste0928/cargo-install@v1 + with: + crate: cargo-deb - name: "Build Deb" run: $HOME/.cargo/bin/cargo +stable deb --output "target/debian/git-interactive-rebase-tool-${{ steps.ref.outputs.name }}-debian-${{ matrix.version }}_amd64.deb" - name: "Upload Release" @@ -163,8 +130,9 @@ jobs: timeout-minutes: 5 steps: - uses: actions/checkout@v3 + - uses: dtolnay/rust-toolchain@stable - name: "Build" - run: "cargo build --release" + run: "cargo +stable build --release" - name: "Rename" run: "cp target/release/interactive-rebase-tool target/release/macos-interactive-rebase-tool" - name: "Upload Release" @@ -179,11 +147,12 @@ jobs: timeout-minutes: 10 steps: - uses: actions/checkout@v3 + - uses: dtolnay/rust-toolchain@stable - name: "Build" run: "cargo rustc --target x86_64-pc-windows-msvc --release --bin interactive-rebase-tool" - name: "Upload Release" uses: softprops/action-gh-release@v1 with: - files: target\x86_64-pc-windows-msvc\release\interactive-rebase-tool.exe + files: target/x86_64-pc-windows-msvc/release/interactive-rebase-tool.exe env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |