Automatic update 2024-11-07 #36
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: "Automatic release with database" | |
on: | |
push: | |
branches: [ "master" ] | |
paths: [ "database/**" ] | |
# Actions | |
# softprops/action-gh-release@v1 https://github.com/softprops/action-gh-release | |
jobs: | |
publish: | |
runs-on: "ubuntu-latest" | |
permissions: | |
contents: write | |
steps: | |
- name: "Checkout" | |
uses: actions/checkout@v4 | |
- name: Install dependencies running on nektos/act | |
if: github.actor == 'nektos/act' | |
run: | | |
apt-get update -y -qq | |
apt-get install -y -qq sqlite3 bzip2 | |
- name: "Package information" | |
id: package_info | |
run: echo "version=v$(cat database/version.txt)" >> $GITHUB_OUTPUT | |
- name: "Create database" | |
run: cat database/schemas/*.sql database/data/*.sql | sqlite3 catalogs.db | |
- name: "Compress database" | |
run: bzip2 catalogs.db | |
- name: "Publish release" | |
if: github.actor != 'nektos/act' | |
uses: softprops/action-gh-release@v1 | |
with: | |
tag_name: ${{ steps.package_info.outputs.version }} | |
files: catalogs.db.bz2 |