Skip to content

Commit

Permalink
fix: include .qm file to release zip generated by workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
Pauliina Paasivirta committed Sep 11, 2023
1 parent 701c0d0 commit 75861bb
Showing 1 changed file with 48 additions and 22 deletions.
70 changes: 48 additions & 22 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,27 +3,31 @@ name: Release
on:
release:
types: [released]
pull_request:
types:
- opened
- synchronize

jobs:
pypi:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-python@v3
with:
python-version: "3.9"
- run: |
pip install build
- run: |
python -m build
- uses: pypa/gh-action-pypi-publish@release/v1
with:
user: __token__
password: ${{ secrets.PYPI_API_TOKEN }}
- uses: svenstaro/[email protected]
with:
file: dist/*
file_glob: true
# pypi:
# runs-on: ubuntu-latest
# steps:
# - uses: actions/checkout@v3
# - uses: actions/setup-python@v3
# with:
# python-version: "3.9"
# - run: |
# pip install build
# - run: |
# python -m build
# - uses: pypa/gh-action-pypi-publish@release/v1
# with:
# user: __token__
# password: ${{ secrets.PYPI_API_TOKEN }}
# - uses: svenstaro/[email protected]
# with:
# file: dist/*
# file_glob: true

qgis:
runs-on: ubuntu-latest
Expand All @@ -32,6 +36,13 @@ jobs:
- uses: actions/setup-python@v3
with:
python-version: "3.9"
# Install Qt and required tools
# - run: |
# sudo apt-get update
# sudo apt-get install -y qttools5-dev-tools
# # Compile .ts files into .qm files using lrelease
# - run: |
# lrelease src/quality_result_gui_plugin/resources/i18n/*.ts
# use extra pip install . to do a non-editable install,
# so that .dist-info will go the package instead of .egg-info
- run: |
Expand All @@ -45,7 +56,22 @@ jobs:
# env:
# QPDT_PUBLISH_USERNAME: ${{ secrets.QGIS_REPO_USERNAME }}
# QPDT_PUBLISH_PASSWORD: ${{ secrets.QGIS_REPO_PASSWORD }}
- uses: svenstaro/[email protected]
# Kommentoidaan pois testien ajaksi
# - uses: svenstaro/[email protected]
# with:
# file: dist/*
# file_glob: true
- run: |
mkdir tmp
unzip -q dist/*.zip -d tmp
- run: |
cp -r src/quality_result_gui_plugin/resources/i18n tmp/quality_result_gui_plugin/resources/i18n
- run: |
zip -qr new.zip -i tmp/*
- run: |
rm -rf tmp
rm dist/*.zip
- uses: actions/upload-artifact@v3
with:
file: dist/*
file_glob: true
name: release-plugin-zip
path: new.zip

0 comments on commit 75861bb

Please sign in to comment.