From 2cd6baca1ecd1d2befc5d6c85441e34ea9a6c4df Mon Sep 17 00:00:00 2001 From: Keval Kapdee Date: Tue, 26 Mar 2024 10:58:41 +0000 Subject: [PATCH 01/13] Release action --- .github/workflows/release.yml | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) create mode 100644 .github/workflows/release.yml diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml new file mode 100644 index 0000000..d873cce --- /dev/null +++ b/.github/workflows/release.yml @@ -0,0 +1,19 @@ +name: release + +on: + release: + types: [created] + +jobs: + release: + name: release + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@master + - name: Compile and release + uses: rust-build/rust-build.action@v1.4.5 + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + with: + RUSTTARGET: x86_64-unknown-linux-musl + EXTRA_FILES: "README.md LICENSE" From 54a95b7722237c20f65c9ab3a1465f52f8f725ae Mon Sep 17 00:00:00 2001 From: Keval Kapdee Date: Thu, 28 Mar 2024 13:16:25 +0000 Subject: [PATCH 02/13] Matrix over feature flags --- .github/workflows/release.yml | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index d873cce..0d37f86 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -7,13 +7,16 @@ on: jobs: release: name: release - runs-on: ubuntu-latest + runs-on: archlinux-latest + strategy: + matrix: + features: [arch, debian] steps: - uses: actions/checkout@master - name: Compile and release uses: rust-build/rust-build.action@v1.4.5 env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - with: RUSTTARGET: x86_64-unknown-linux-musl + FEATURES: ${{ features }} EXTRA_FILES: "README.md LICENSE" From 78530984603ef98e09cbca8731dd5ade14bd8c23 Mon Sep 17 00:00:00 2001 From: Keval Kapdee Date: Thu, 28 Mar 2024 13:19:50 +0000 Subject: [PATCH 03/13] Fix syntax --- .github/workflows/release.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 0d37f86..c913dcf 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -18,5 +18,5 @@ jobs: env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} RUSTTARGET: x86_64-unknown-linux-musl - FEATURES: ${{ features }} + FEATURES: ${{ matrix.features }} EXTRA_FILES: "README.md LICENSE" From 8097b2f6a38d39dbbb5b48c104d21c9cd92811a8 Mon Sep 17 00:00:00 2001 From: Keval Kapdee Date: Thu, 28 Mar 2024 13:31:29 +0000 Subject: [PATCH 04/13] Switch back to ubuntu runner --- .github/workflows/release.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index c913dcf..09cd9cc 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -7,7 +7,7 @@ on: jobs: release: name: release - runs-on: archlinux-latest + runs-on: ubuntu-latest strategy: matrix: features: [arch, debian] From 3b7ddf53312c5161e2b50d29b5349403f0f86187 Mon Sep 17 00:00:00 2001 From: Keval Kapdee Date: Thu, 28 Mar 2024 15:53:02 +0000 Subject: [PATCH 05/13] Simpler setup --- .github/workflows/release.yml | 21 +++++++++++++-------- 1 file changed, 13 insertions(+), 8 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 09cd9cc..6a1bfd5 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -8,15 +8,20 @@ jobs: release: name: release runs-on: ubuntu-latest + container: + image: ghcr.io/archlinux/archlinux:latest strategy: matrix: - features: [arch, debian] + features: [arch, debian] steps: + - name: Install rust toolchain + run: pacman -Syy --noconfirm rust - uses: actions/checkout@master - - name: Compile and release - uses: rust-build/rust-build.action@v1.4.5 - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - RUSTTARGET: x86_64-unknown-linux-musl - FEATURES: ${{ matrix.features }} - EXTRA_FILES: "README.md LICENSE" + - name: Build + run: cargo build --release --features ${{ matrix.features }} + - name: Create archive + run: tar czf pacdef-${{ matrix.features }}.tar.gz target/release/pacdef LICENCE README.md + - name: Upload to release + uses: softprops/action-gh-release@v1 + with: + files: pacdef-pacdef-${{ matrix.features }}.tar.gz From ddfeb58264700d250701d92cdc92bc0d49106c91 Mon Sep 17 00:00:00 2001 From: Keval Kapdee Date: Thu, 28 Mar 2024 15:57:13 +0000 Subject: [PATCH 06/13] Libalpm --- .github/workflows/release.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 6a1bfd5..d562454 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -9,13 +9,13 @@ jobs: name: release runs-on: ubuntu-latest container: - image: ghcr.io/archlinux/archlinux:latest + image: ghcr.io/archlinux/archlinux:base-devel strategy: matrix: features: [arch, debian] steps: - name: Install rust toolchain - run: pacman -Syy --noconfirm rust + run: pacman -Syy --noconfirm rust libalpm - uses: actions/checkout@master - name: Build run: cargo build --release --features ${{ matrix.features }} From cd5e0a800a7ef02d1e7d14c766447f758e3605a4 Mon Sep 17 00:00:00 2001 From: Keval Kapdee Date: Thu, 28 Mar 2024 16:04:26 +0000 Subject: [PATCH 07/13] Remove bad install --- .github/workflows/release.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index d562454..2b7abb8 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -15,7 +15,7 @@ jobs: features: [arch, debian] steps: - name: Install rust toolchain - run: pacman -Syy --noconfirm rust libalpm + run: pacman -Syy --noconfirm rust - uses: actions/checkout@master - name: Build run: cargo build --release --features ${{ matrix.features }} From c06626663ec71bb3957e9311404c4a1d9c31d210 Mon Sep 17 00:00:00 2001 From: Keval Kapdee Date: Thu, 28 Mar 2024 16:13:49 +0000 Subject: [PATCH 08/13] Default features and install apt --- .github/workflows/release.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 2b7abb8..c98dc19 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -12,10 +12,10 @@ jobs: image: ghcr.io/archlinux/archlinux:base-devel strategy: matrix: - features: [arch, debian] + features: [default, arch, debian] steps: - - name: Install rust toolchain - run: pacman -Syy --noconfirm rust + - name: Install dependencies + run: pacman -Syy --noconfirm rust apt - uses: actions/checkout@master - name: Build run: cargo build --release --features ${{ matrix.features }} From 8caad2ae5a21711f8993ecab8f8e82efcea1d4e4 Mon Sep 17 00:00:00 2001 From: Keval Kapdee Date: Thu, 28 Mar 2024 16:15:33 +0000 Subject: [PATCH 09/13] Spelling mistake --- .github/workflows/release.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index c98dc19..bb8f799 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -20,7 +20,7 @@ jobs: - name: Build run: cargo build --release --features ${{ matrix.features }} - name: Create archive - run: tar czf pacdef-${{ matrix.features }}.tar.gz target/release/pacdef LICENCE README.md + run: tar czf pacdef-${{ matrix.features }}.tar.gz target/release/pacdef LICENSE README.md - name: Upload to release uses: softprops/action-gh-release@v1 with: From c3aaf5ffbd605a562e67da708371faf9be9abdd0 Mon Sep 17 00:00:00 2001 From: Keval Kapdee Date: Thu, 28 Mar 2024 16:17:57 +0000 Subject: [PATCH 10/13] More spelling --- .github/workflows/release.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index bb8f799..95062b7 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -24,4 +24,4 @@ jobs: - name: Upload to release uses: softprops/action-gh-release@v1 with: - files: pacdef-pacdef-${{ matrix.features }}.tar.gz + files: pacdef-${{ matrix.features }}.tar.gz From 73d21ae7f53c7990c7d1873aa6d7f1c78b7c545d Mon Sep 17 00:00:00 2001 From: Keval Kapdee Date: Thu, 28 Mar 2024 16:41:32 +0000 Subject: [PATCH 11/13] Update upload action version --- .github/workflows/release.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 95062b7..bd9f7d3 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -22,6 +22,6 @@ jobs: - name: Create archive run: tar czf pacdef-${{ matrix.features }}.tar.gz target/release/pacdef LICENSE README.md - name: Upload to release - uses: softprops/action-gh-release@v1 + uses: softprops/action-gh-release@v2 with: files: pacdef-${{ matrix.features }}.tar.gz From fe260fe515729f535950399560bafd58865b029d Mon Sep 17 00:00:00 2001 From: Keval Kapdee Date: Thu, 28 Mar 2024 16:42:26 +0000 Subject: [PATCH 12/13] Add git --- .github/workflows/release.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index bd9f7d3..006b3e3 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -15,7 +15,7 @@ jobs: features: [default, arch, debian] steps: - name: Install dependencies - run: pacman -Syy --noconfirm rust apt + run: pacman -Syy --noconfirm rust apt git - uses: actions/checkout@master - name: Build run: cargo build --release --features ${{ matrix.features }} From efe19d4e6194702a6e4130563109f2a0698bca7f Mon Sep 17 00:00:00 2001 From: Keval Kapdee Date: Tue, 2 Apr 2024 19:24:13 +0100 Subject: [PATCH 13/13] Fix tarball --- .github/workflows/release.yml | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 006b3e3..98ad05e 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -19,8 +19,12 @@ jobs: - uses: actions/checkout@master - name: Build run: cargo build --release --features ${{ matrix.features }} - - name: Create archive - run: tar czf pacdef-${{ matrix.features }}.tar.gz target/release/pacdef LICENSE README.md + - name: Create temporary directory + run: mkdir pacdef-${{ matrix.features }} + - name: Copy artifacts to directory + run: cp -R target/release/pacdef man LICENSE README.md pacdef-${{ matrix.features }} + - name: Create archive from directory + run: tar czf pacdef-${{ matrix.features }}.tar.gz pacdef-${{ matrix.features }} - name: Upload to release uses: softprops/action-gh-release@v2 with: