Skip to content

Commit 7a56f3d

Browse files
committed
Update release workflow with latest debian/ubuntu
Also address a few issues with the release workflow that would have resulted in failures.
1 parent cd480fc commit 7a56f3d

File tree

2 files changed

+38
-64
lines changed

2 files changed

+38
-64
lines changed

.github/workflows/release-latest.yml

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -15,13 +15,18 @@ jobs:
1515
REPOSITORY: "MitMaro/git-interactive-rebase-tool"
1616
steps:
1717
- uses: actions/checkout@v3
18-
- uses: dtolnay/rust-toolchain@stable
1918
- uses: Swatinem/rust-cache@v2
2019
- name: "System Setup"
2120
run: |
22-
sudo apt-get update || true;
23-
sudo apt-get --assume-yes -f install curl build-essential pkg-config liblzma-dev;
24-
cargo install --force cargo-deb
21+
apt-get update;
22+
apt-get --assume-yes -f install curl build-essential pkg-config;
23+
env:
24+
DEBIAN_FRONTEND: noninteractive
25+
TZ: "America/St_Johns"
26+
- uses: dtolnay/rust-toolchain@stable
27+
- uses: baptiste0928/cargo-install@v1
28+
with:
29+
crate: cargo-deb
2530
- name: "Build Deb"
2631
run: cargo +stable deb --output "target/debian/git-interactive-rebase-tool-ubuntu_amd64.deb" -- --features dev
2732
- name: Upload

.github/workflows/release.yml

Lines changed: 29 additions & 60 deletions
Original file line numberDiff line numberDiff line change
@@ -25,15 +25,16 @@ jobs:
2525
echo "$ref";
2626
echo "::set-output name=name::$ref"
2727
- uses: actions/checkout@v3
28+
# manually install and use rustup, since dtolnay/rust-toolchain is not supported on older versions of Ubuntu
2829
- name: "System Setup"
2930
run: |
30-
apt-get update;
31-
apt-get --assume-yes -f install curl build-essential pkg-config;
32-
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- --default-toolchain stable -y;
33-
$HOME/.cargo/bin/cargo install --force cargo-deb
31+
apt-get update;
32+
apt-get --assume-yes -f install curl build-essential pkg-config;
33+
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- --default-toolchain stable -y;
34+
$HOME/.cargo/bin/cargo install --force cargo-deb
3435
env:
35-
DEBIAN_FRONTEND: noninteractive
36-
TZ: "America/St_Johns"
36+
DEBIAN_FRONTEND: noninteractive
37+
TZ: "America/St_Johns"
3738
- name: "Build Deb"
3839
run: $HOME/.cargo/bin/cargo +stable deb --output "target/debian/git-interactive-rebase-tool-${{ steps.ref.outputs.name }}-ubuntu-${{ matrix.version }}_amd64.deb"
3940
- name: "Upload Release"
@@ -46,7 +47,7 @@ jobs:
4647
build-ubuntu:
4748
strategy:
4849
matrix:
49-
version: ['18.04', '20.04', '22.04']
50+
version: ['18.04', '20.04', '22.04', '22.10', '23.04']
5051
runs-on: ubuntu-latest
5152
timeout-minutes: 10
5253
container:
@@ -65,13 +66,15 @@ jobs:
6566
- uses: actions/checkout@v3
6667
- name: "System Setup"
6768
run: |
68-
apt-get update;
69-
apt-get --assume-yes -f install curl build-essential pkg-config liblzma-dev;
70-
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- --default-toolchain stable -y;
71-
$HOME/.cargo/bin/cargo install --force cargo-deb
69+
apt-get update;
70+
apt-get --assume-yes -f install curl build-essential pkg-config;
7271
env:
73-
DEBIAN_FRONTEND: noninteractive
74-
TZ: "America/St_Johns"
72+
DEBIAN_FRONTEND: noninteractive
73+
TZ: "America/St_Johns"
74+
- uses: dtolnay/rust-toolchain@stable
75+
- uses: baptiste0928/cargo-install@v1
76+
with:
77+
crate: cargo-deb
7578
- name: "Build Deb"
7679
run: $HOME/.cargo/bin/cargo +stable deb --output "target/debian/git-interactive-rebase-tool-${{ steps.ref.outputs.name }}-ubuntu-${{ matrix.version }}_amd64.deb"
7780
- name: "Upload Release"
@@ -82,48 +85,10 @@ jobs:
8285
env:
8386
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
8487

85-
build-debian-legacy:
86-
strategy:
87-
matrix:
88-
version: ['8']
89-
runs-on: ubuntu-latest
90-
timeout-minutes: 10
91-
container:
92-
image: 'docker://debian:${{ matrix.version }}-slim'
93-
steps:
94-
- name: "Get Tag Name"
95-
id: ref
96-
shell: bash
97-
run: |
98-
ref="${{ github.ref }}";
99-
ref="${ref//refs\/heads\//}";
100-
ref="${ref//refs\/tags\//}";
101-
ref="${ref//master/dev}";
102-
echo "$ref";
103-
echo "::set-output name=name::$ref"
104-
- uses: actions/checkout@v3
105-
- name: "System Setup"
106-
run: |
107-
apt-get update;
108-
apt-get --assume-yes -f install curl build-essential pkg-config;
109-
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- --default-toolchain stable -y;
110-
$HOME/.cargo/bin/cargo install --force cargo-deb
111-
env:
112-
DEBIAN_FRONTEND: noninteractive
113-
TZ: "America/St_Johns"
114-
- name: "Build Deb"
115-
run: $HOME/.cargo/bin/cargo +stable deb --output "target/debian/git-interactive-rebase-tool-${{ steps.ref.outputs.name }}-debian-${{ matrix.version }}_amd64.deb"
116-
- name: "Upload Release"
117-
uses: softprops/action-gh-release@v1
118-
with:
119-
files: |
120-
target/debian/*.deb
121-
env:
122-
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
12388
build-debian:
12489
strategy:
12590
matrix:
126-
version: ['9', '10', 'bullseye', 'sid']
91+
version: ['10', '11', '12', 'sid']
12792
runs-on: ubuntu-latest
12893
timeout-minutes: 10
12994
container:
@@ -142,13 +107,15 @@ jobs:
142107
- uses: actions/checkout@v3
143108
- name: "System Setup"
144109
run: |
145-
apt-get update;
146-
apt-get --assume-yes -f install curl build-essential pkg-config liblzma-dev;
147-
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- --default-toolchain stable -y;
148-
$HOME/.cargo/bin/cargo install --force cargo-deb
110+
apt-get update;
111+
apt-get --assume-yes -f install curl build-essential pkg-config;
149112
env:
150-
DEBIAN_FRONTEND: noninteractive
151-
TZ: "America/St_Johns"
113+
DEBIAN_FRONTEND: noninteractive
114+
TZ: "America/St_Johns"
115+
- uses: dtolnay/rust-toolchain@stable
116+
- uses: baptiste0928/cargo-install@v1
117+
with:
118+
crate: cargo-deb
152119
- name: "Build Deb"
153120
run: $HOME/.cargo/bin/cargo +stable deb --output "target/debian/git-interactive-rebase-tool-${{ steps.ref.outputs.name }}-debian-${{ matrix.version }}_amd64.deb"
154121
- name: "Upload Release"
@@ -163,8 +130,9 @@ jobs:
163130
timeout-minutes: 5
164131
steps:
165132
- uses: actions/checkout@v3
133+
- uses: dtolnay/rust-toolchain@stable
166134
- name: "Build"
167-
run: "cargo build --release"
135+
run: "cargo +stable build --release"
168136
- name: "Rename"
169137
run: "cp target/release/interactive-rebase-tool target/release/macos-interactive-rebase-tool"
170138
- name: "Upload Release"
@@ -179,11 +147,12 @@ jobs:
179147
timeout-minutes: 10
180148
steps:
181149
- uses: actions/checkout@v3
150+
- uses: dtolnay/rust-toolchain@stable
182151
- name: "Build"
183152
run: "cargo rustc --target x86_64-pc-windows-msvc --release --bin interactive-rebase-tool"
184153
- name: "Upload Release"
185154
uses: softprops/action-gh-release@v1
186155
with:
187-
files: target\x86_64-pc-windows-msvc\release\interactive-rebase-tool.exe
156+
files: target/x86_64-pc-windows-msvc/release/interactive-rebase-tool.exe
188157
env:
189158
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

0 commit comments

Comments
 (0)