Skip to content

Increment nightly version #1634

Increment nightly version

Increment nightly version #1634

Workflow file for this run

name: macx
on:
push:
tags:
- 'nightly'
jobs:
build:
runs-on: macos-latest
timeout-minutes: 30
steps:
- uses: actions/checkout@v2
# Increment version. Ideally we would like to do it once for all builds,
# but this is complicated as we want to allow to trigger a nightly by
# pushing the tag, so this can't be in nightly.yml. One option would be to
# have another intermediate workflow, but we take the quik & dirty
# solution: increment it in each workflow and push it in one (linux.yml).
- name: Increment version
id: version
run: |
version=$(grep "define NIGHTLY" source/LeLib/data.cpp | awk '{ print $3 }')
let version=${version}+1
# Mac uses BSD sed where -i takes a parameter (an extension for the
# backup file, empty string disables backup)
sed -i '' "s/define NIGHTLY .*/define NIGHTLY $version/" source/LeLib/data.cpp
version=$(grep "define \(MAJOR\|FEATURE\|NIGHTLY\)" source/LeLib/data.cpp | awk '{ print $3 }' | xargs | sed 's/ /\./g')
echo "::set-output name=TRSE_VERSION::${version}"
- uses: actions/setup-node@v4
- uses: jurplel/install-qt-action@v3
with:
aqtversion: '==3.1.*'
version: '6.6.0'
host: 'mac'
target: 'desktop'
arch: 'clang_64'
- run: brew install libomp
- run: qmake TRSE.pro
- run: make -j 3 arch=arm64
- run: cd Publish/publish_mac && ./publish_mac.sh nightly
- uses: ColinPitrat/update-release@master
with:
release: nightly
message: Nightly build
body: TRSE ${{ steps.version.outputs.TRSE_VERSION }} <br/> The latest automated nightly build of TRSE which succeeded. This is the recommended version to use.
files: Publish/publish_mac/trse_osx.tar.gz
prerelease: false
token: ${{ secrets.GITHUB_TOKEN }}
- name: Build notification
if: failure()
uses: adamkdean/simple-slack-notify@master
env:
SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL }}
with:
channel: #bugs
text: "[GitHub Actions Notification] MacOS build failed: ${env.GITHUB_SERVER_URL}/${env.GITHUB_REPOSITORY}/actions/runs/${env.GITHUB_RUN_ID}"