Skip to content

📦 Release

📦 Release #55

Workflow file for this run

name: 📦 Release
on:
release:
types: [published]
jobs:
release:
name: Create release
runs-on: ubuntu-latest
env:
TX_TOKEN: ${{ secrets.TX_TOKEN }}
DOCKER_TAG: stable
COMPOSE_FILE: .docker/docker-compose.yml
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Install Transifex
run: |
curl -OL https://github.com/transifex/cli/releases/download/v1.6.5/tx-linux-amd64.tar.gz
tar -xvzf tx-linux-amd64.tar.gz
- name: Set version
run: echo ${{ github.event.release.tag_name }} > CURRENT_VERSION.txt
- name: Docker build
run: |
docker compose --profile qgis --profile schemaspy up --build -d
docker compose exec signalo init_db.sh wait
- name: create dumps
run: |
docker compose exec signalo pg_dump --format custom --exclude-schema=public --blobs --compress 5 --file signalo-${{ github.event.release.tag_name }}-db-dump.backup signalo
docker compose exec signalo pg_dump --format plain --exclude-schema=public --file signalo-${{ github.event.release.tag_name }}-db-dump.sql signalo
docker compose exec signalo pg_dump --format plain --schema=signalo_app --file signalo-${{ github.event.release.tag_name }}-db-app.sql signalo
docker compose exec signalo init_db.sh build -d
docker compose exec signalo pg_dump --format custom --exclude-schema=public --blobs --compress 5 --file signalo-${{ github.event.release.tag_name }}-db-dump-with-demo.backup signalo
docker compose exec signalo pg_dump --format plain --exclude-schema=public --file signalo-${{ github.event.release.tag_name }}-db-dump-with-demo.sql signalo
- name: translate project
run: |
./tx pull -a
docker compose run qgis sh -c 'xvfb-run /usr/src/project/scripts/project-translation-compile.sh /usr/src/project'
rm project/signalo_*.ts # do not package ts files
- name: set project version + create project archive
run: |
sed -i 's|<title>Signalo - Demo</title>|<title>Signalo - v${{ github.event.release.tag_name }}</title>|' project/signalo.qgs
sed -i 's|projectname="Signalo - Demo"|projectname="Signalo - v${{ github.event.release.tag_name }}"|' project/signalo.qgs
sed 's/pg_signalo/pg_signalo_dev/g' project/signalo.qgs > project/signalo_dev.qgs
sed 's/pg_signalo/pg_signalo_prod/g' project/signalo.qgs > project/signalo_prod.qgs
cp datamodel/demo_data/this-is-the-way.jpg project/this-is-the-way.jpg
zip -r signalo-${{ github.event.release.tag_name }}-project.zip project README.md
- name: zip changelogs
run: |
zip -r signalo-${{ github.event.release.tag_name }}-changelogs.zip datamodel/changelogs
- name: schemaspy
run: |
sed -i "s/version dev/version ${{ github.event.release.tag_name }}/" datamodel/schemaspy.properties
docker compose run schemaspy
zip -r signalo-${{ github.event.release.tag_name }}-model-documentation.zip model-documentation/*
- name: Login to DockerHub
if: github.event_name != 'pull_request'
uses: docker/login-action@v3
with:
username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_PASSWORD }}
- name: "push to dockerhub"
if: github.event_name != 'pull_request'
run: |
docker push opengisch/signalo:stable
docker tag opengisch/signalo:stable opengisch/signalo:${{ github.event.release.tag_name }}
docker push opengisch/signalo:${{ github.event.release.tag_name }}
- name: Upload Release Assets
uses: softprops/action-gh-release@v1
with:
files: |
signalo-${{ github.event.release.tag_name }}-project.zip
signalo-${{ github.event.release.tag_name }}-changelogs.zip
signalo-${{ github.event.release.tag_name }}-model-documentation.zip
signalo-${{ github.event.release.tag_name }}-db-dump.backup
signalo-${{ github.event.release.tag_name }}-db-dump.sql
signalo-${{ github.event.release.tag_name }}-db-app.sql
signalo-${{ github.event.release.tag_name }}-db-dump-with-demo.backup
signalo-${{ github.event.release.tag_name }}-db-dump-with-demo.sql
rebuild-website:
uses: ./.github/workflows/website.yml
secrets: inherit
needs: release