Skip to content

Use official SQLite3 binaries #43

Use official SQLite3 binaries

Use official SQLite3 binaries #43

Workflow file for this run

name: Create SQLite Database and Release
on:
push:
branches:
- master
paths-ignore: [ '**.md'] # If only these files are edited, skip
workflow_dispatch:
jobs:
release:
runs-on: ubuntu-latest
steps:
- name: Checkout Repository
uses: actions/checkout@v2
- name: Install Dependencies
run: sudo apt-get update && sudo apt-get install -y wget build-essential tcl unzip
- name: Fetch Latest SQLite Version
run: |
# Get the latest version number from the SQLite website
LATEST_VERSION=$(curl -s https://www.sqlite.org/download.html | grep -oP 'sqlite-autoconf-\K[0-9]+(?=\.tar\.gz)' | head -n 1)
echo "Latest version: $LATEST_VERSION"
# Construct the download URL
DOWNLOAD_URL="https://www.sqlite.org/2024/sqlite-tools-linux-x64-$LATEST_VERSION.zip"
echo "Download URL: $DOWNLOAD_URL"
echo "LATEST_VERSION=$LATEST_VERSION" >> $GITHUB_ENV
echo "DOWNLOAD_URL=$DOWNLOAD_URL" >> $GITHUB_ENV
- name: Download SQLite
run: |
wget ${{ env.DOWNLOAD_URL }}
unzip sqlite-tools-linux-x64-${{ env.LATEST_VERSION }}.zip -d .
chmod +x sqlite3
- name: Convert Plain-text to SQLite
run: |
sqlite3 piddatabase.db < umskt.db
mv umskt.db piddatabase.sql
- name: Create Release
id: create_release
uses: softprops/action-gh-release@v2
with:
files: |
piddatabase.db
piddatabase.sql
tag_name: v1.0.${{ github.run_number }}
token: ${{ secrets.UPLOAD_KEY }}