Prohibit editing documents in the trash #725
Workflow file for this run
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: Build Starc for Mac | |
env: | |
APP_VERSION: 0.7.6 | |
on: | |
push: | |
branches: [ master ] | |
pull_request: | |
branches: [ master ] | |
create: | |
tags: | |
- v* | |
workflow_dispatch: {} | |
jobs: | |
build_mac: | |
name: Build Mac OS X version | |
runs-on: macos-latest | |
timeout-minutes: 120 | |
steps: | |
- name: Checkout Sources for push or create tag event | |
if: ${{ github.event_name != 'pull_request' }} | |
uses: actions/checkout@master | |
with: | |
token: ${{ secrets.ACTION_RUNNER }} | |
submodules: recursive | |
fetch-depth: 0 | |
- name: Checkout sources for pull request event | |
if: ${{ github.event_name == 'pull_request' }} | |
uses: actions/checkout@master | |
- name: Checkout submodules for pull request event | |
if: ${{ github.event_name == 'pull_request' }} | |
shell: bash | |
run: | | |
git submodule update --init --recursive src/3rd_party/qbreakpad/ src/3rd_party/pdfhummus/ src/3rd_party/pdftextextraction/ | |
- name: Add info about dev build to the env | |
shell: bash | |
run: | | |
echo "DEV_BUILD=$(git rev-list `git rev-list --tags --no-walk --max-count=1`..HEAD --count)" >> $GITHUB_ENV | |
- name: Install Qt | |
uses: jurplel/install-qt-action@v4 | |
with: | |
version: 5.15.2 | |
target: desktop | |
- name: Run QMake | |
shell: bash | |
run: | | |
cd src | |
qmake starc.pro DEFINES+="DEV_BUILD=$DEV_BUILD" | |
- name: Build | |
shell: bash | |
run: | | |
cd src | |
make -j2 | |
- name: Make dmg image | |
shell: bash | |
run: | | |
cd build/mac | |
./create_dmg.sh ${{env.APP_VERSION}} | |
env: | |
APPLE_CERTIFICATE: ${{ secrets.APPLE_CERTIFICATE }} | |
APPLE_CERTIFICATE_PASSWORD: ${{ secrets.APPLE_CERTIFICATE_PASSWORD }} | |
APPLE_KEYCHAIN_PASSWORD: ${{ secrets.APPLE_KEYCHAIN_PASSWORD }} | |
APPLE_SIGNING_IDENTITY: ${{ secrets.APPLE_SIGNING_IDENTITY }} | |
APPLE_ID: ${{ secrets.APPLE_ID }} | |
APPLE_ID_APP_PASSWORD: ${{ secrets.APPLE_ID_APP_PASSWORD }} | |
APPLE_TEAM_ID: ${{ secrets.APPLE_TEAM_ID }} | |
- name: Collect artifacts | |
uses: actions/upload-artifact@v3 | |
with: | |
name: mac packages | |
path: build/mac/starc-setup.dmg | |
- name: Publish artifacts to the dev stream and notify clients | |
if: startsWith(github.ref, 'refs/tags/') != true | |
shell: bash | |
run: | | |
curl -F "api_key=${{ secrets.STARC_API_KEY }}" -F "name_for_file=starc-setup.dmg" -F "file_bin=@build/mac/starc-setup.dmg" https://starc.app/api/app/updates/publish | |
curl -F "api_key=${{ secrets.STARC_API_KEY }}" -F "system=mac" -F "version=${{env.APP_VERSION}} dev ${{env.DEV_BUILD}}" https://starc.app/api/app/updates/notify | |
- name: Publish artifacts to the GitHub releases | |
uses: softprops/action-gh-release@v1 | |
if: startsWith(github.ref, 'refs/tags/') | |
with: | |
files: build/mac/starc-setup.dmg | |
- name: Notify clients that stable release published | |
if: startsWith(github.ref, 'refs/tags/') | |
shell: bash | |
run: | | |
curl -F "api_key=${{ secrets.STARC_API_KEY }}" -F "system=mac" -F "version=${{env.APP_VERSION}}" https://starc.app/api/app/updates/notify |