Skip to content

Release Zotero/Juris-M .deb packages #17066

Release Zotero/Juris-M .deb packages

Release Zotero/Juris-M .deb packages #17066

Workflow file for this run

name: Release Zotero/Juris-M .deb packages
on:
schedule:
- cron: 0 */2 * * *
push:
workflow_dispatch:
inputs:
build:
description: forced rebuild
required: false
default: ''
publish:
description: forced publish
required: false
default: ''
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
rebuild:
runs-on: ubuntu-latest
# runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v4
#- run: curl -fsSL https://crystal-lang.org/install.sh | sudo bash
- run: |
curl -fsSL https://packagecloud.io/84codes/crystal/gpgkey | gpg --dearmor | sudo tee /etc/apt/trusted.gpg.d/84codes_crystal.gpg > /dev/null
. /etc/os-release
echo "deb https://packagecloud.io/84codes/crystal/$ID $VERSION_CODENAME main" | sudo tee /etc/apt/sources.list.d/84codes_crystal.list
- name: import GPG key
uses: retorquere/ghaction-import-gpg@master
with:
gpg_private_key: ${{ secrets.GPG_PRIVATE_KEY }}
- name: install build requirements
run: |
sudo apt-get -q update
sudo apt-get -qy install devscripts fakeroot moreutils pandoc crystal
- name: install nfpm
run: |
echo 'deb [trusted=yes] https://repo.goreleaser.com/apt/ /' | sudo tee /etc/apt/sources.list.d/goreleaser.list
sudo apt update
sudo apt install nfpm
- name: install rclone
run: curl https://rclone.org/install.sh | sudo bash
- name: configure rclone
run: |
mkdir -p ~/.config/rclone
cat <<EOF > ~/.config/rclone/rclone.conf
[b2-apt-package-archive]
type = b2
account = ${{ secrets.B2_APPLICATION_KEY_ID }}
key = ${{ secrets.B2_APPLICATION_KEY }}
hard_delete = true
download_url = https://zotero.retorque.re
EOF
- name: cache repo
uses: actions/cache@v4
env:
cache-name: v6
with:
path: |
apt
rebuild-apt
key: repo-${{ env.cache-name }}-${{ hashFiles('rebuild-apt.cr', 'staging.cr') }}
- name: rebuild
id: rebuild
run: make
env:
BUILD: ${{ github.event.inputs.build }}
PUBLISH: ${{ github.event.inputs.publish }}
- name: show status
run: echo publish=${{ steps.rebuild.outputs.update }}
- name: publish repo
if: ${{ steps.rebuild.outputs.update == 'true' }}
run: |
rclone sync apt b2-apt-package-archive:apt-package-archive -v
rclone cleanup b2-apt-package-archive:apt-package-archive -v
test:
runs-on: ubuntu-latest
outputs:
status: success
needs: rebuild
steps:
- name: allow cloudflare CDN time to settle
run: sleep 60
- name: install apt repo
run: |
export INSTALLSH=https://raw.githubusercontent.com/retorquere/zotero-deb/master/install.sh
echo INSTALLSH=$INSTALLSH
curl -sL $INSTALLSH | tee install.sh | sudo bash
echo ==== install.sh ===
cat install.sh
echo ==== zotero.list ===
cat /etc/apt/sources.list.d/zotero.list
- name: install from backblaze repo
run: |
sudo apt -y clean
sudo apt -y update
sudo apt -y install desktop-file-utils zotero zotero6 zotero-beta || true
dpkg -l | grep zotero
for c in zotero zotero6 zotero-beta; do
echo ----------
echo $c binaries
ls -lh /usr/lib/$c/zotero /usr/lib/$c/zotero-bin /usr/bin/$c
echo
echo $c.desktop
cat /usr/share/applications/$c.desktop
echo
echo validate $c.desktop
desktop-file-validate /usr/share/applications/$c.desktop && echo 'all clear!'
done