-
-
Notifications
You must be signed in to change notification settings - Fork 125
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Rewrite macOS build workflow and make some changes to build script
- Loading branch information
Showing
3 changed files
with
110 additions
and
101 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,81 @@ | ||
name: Packaging | ||
|
||
on: | ||
push: | ||
tags: | ||
- "*" | ||
pull_request: | ||
branches: | ||
- patch | ||
|
||
jobs: | ||
buildAssets: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Python Setup | ||
uses: actions/setup-python@v4 | ||
with: | ||
python-version: 3 | ||
architecture: x64 | ||
|
||
- name: Install Packages (apt) | ||
run: | | ||
sudo apt update | ||
sudo apt install qttools5-dev-tools python3-sphinx latexmk texlive texlive-latex-extra | ||
- name: Checkout Source | ||
uses: actions/checkout@v3 | ||
|
||
- name: Run Build Commands | ||
run: python setup.py qtlrelease sample manual | ||
|
||
- name: Upload Artifacts | ||
uses: actions/upload-artifact@v3 | ||
with: | ||
name: nw-assets-${{ github.sha }} | ||
path: | | ||
novelwriter/assets/sample.zip | ||
novelwriter/assets/manual.pdf | ||
novelwriter/assets/i18n/*.qm | ||
if-no-files-found: error | ||
retention-days: 1 | ||
|
||
buildMac: | ||
needs: buildAssets | ||
strategy: | ||
fail-fast: false | ||
runs-on: macos-12 | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v3 | ||
|
||
- name: Get Version | ||
shell: bash | ||
run: | | ||
NW_VERSION=`awk '/^__version__/{print substr($NF,2,length($NF)-2)}' novelwriter/__init__.py` | ||
echo "novelWriter Version: $NW_VERSION" | ||
echo "VERSION=$NW_VERSION" >> $GITHUB_ENV | ||
- name: Download Artifact | ||
uses: actions/download-artifact@v3 | ||
with: | ||
name: nw-assets-${{ github.sha }} | ||
path: novelwriter/assets | ||
|
||
- name: Build | ||
run: | | ||
./setup/macos/build.sh | ||
- name: Upload ZIP | ||
uses: actions/upload-artifact@v3 | ||
with: | ||
name: novelWriter-${{ env.VERSION }}-macos.app.zip | ||
path: dist_macos/novelWriter-${{ env.VERSION }}.app.zip | ||
retention-days: 1 | ||
|
||
- name: Upload DMG | ||
uses: actions/upload-artifact@v3 | ||
with: | ||
name: novelWriter-${{ env.VERSION }}-macos.dmg | ||
path: dist_macos/novelWriter-${{ env.VERSION }}.dmg | ||
retention-days: 1 |
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