Experiment with building the .deb packages.

Innernet no longer builds the .deb packages, so this repository is meaningless as-is.
pull/1/head
tommie 2023-02-17 15:13:44 +01:00 committed by GitHub
parent d789ee7fb7
commit bc0eef18dd
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 63 additions and 14 deletions

View File

@ -4,9 +4,9 @@ name: Update Repository
# Controls when the workflow will run
on:
push:
#push:
# If the configuration has changed, this ensures we apply updates.
branches: [ main ]
#branches: [ main ]
schedule:
# Upstream releases around once per month, so twice a week should be fine.
@ -14,22 +14,66 @@ on:
workflow_dispatch:
# A workflow run is made up of one or more jobs that can run sequentially or in parallel
jobs:
# This workflow contains a single job called "build"
build:
build-deb:
name: Build DEB Packages
runs-on: ubuntu-latest
steps:
- name: Install dependencies
run: sudo env DEBIAN_FRONTEND=noninteractive apt-get install --no-install-recommends --yes gpg jq reprepro
- name: Install Distro Dependencies
run: sudo env DEBIAN_FRONTEND=noninteractive apt-get install --no-install-recommends --yes dpkg-dev liblzma-dev
- name: Checkout
uses: actions/checkout@v2
- name: Download Latest Release
id: download-release
run: |
wget -O- \
-H'Accept: application/json' \
"https://api.github.com/repos/tonariono/innernet/releases/latest" \
| jq -r '(.name + " " + .tarball_url)' \
| (
read release tarball_url
wget --header='Accept: application/octet-stream' -O- "$tarball_url" | tar xz
echo "innernet_release=$release" >>"$GITHUB_OUTPUT"
)
- name: Install Rust
uses: actions-rs/toolchain@v1
with:
# See https://github.com/marketplace/actions/github-push
persist-credentials: false
fetch-depth: 0
profile: minimal
override: true
- name: Install cargo-deb
run: |
type -p cargo-deb || cargo install cargo-deb
- name: Set up Rust Cache
uses: Swatinem/rust-cache@v1
- name: Build Client DEB
uses: actions-rs/cargo@v1
with:
command: deb
args: -p client
- name: Build Server DEB
uses: actions-rs/cargo@v1
with:
command: deb
args: -p server
- name: Upload DEBs
uses: actions/upload-artifact@v2
with:
name: deb-ubuntu-latest
path: target/debian/*.deb
release:
runs-on: ubuntu-latest
needs: [build-deb]
steps:
- name: Install Distro Dependencies
run: sudo env DEBIAN_FRONTEND=noninteractive apt-get install --no-install-recommends --yes gpg jq reprepro
- name: Set up GPG keys
run: |
@ -41,7 +85,12 @@ jobs:
echo "${{ secrets.GPG_SIGNING_KEY }}" | gpg --quiet --batch --yes --import
echo '${{ secrets.GPG_SIGNING_PASSPHRASE }}' | /usr/lib/gnupg/gpg-preset-passphrase --preset 57F0E65446A301CC19914FD61167922350A2D8B2
- name: Download and include package files
- name: Get artifacts
uses: actions/download-artifact@v2
with:
name: deb-ubuntu-latest
- name: Update Repository
run: ./addlatest
- name: Push changes