Experiment with building the .deb packages.
Innernet no longer builds the .deb packages, so this repository is meaningless as-is.pull/1/head
parent
d789ee7fb7
commit
bc0eef18dd
|
@ -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: |
|
||||
|
@ -40,8 +84,13 @@ jobs:
|
|||
gpgconf --reload gpg-agent
|
||||
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
|
||||
|
|
Loading…
Reference in New Issue