Skip to content

Recreate tag to ensure compressed files are recreated #40

Recreate tag to ensure compressed files are recreated

Recreate tag to ensure compressed files are recreated #40

Workflow file for this run

name: Nightly Build
on:
push:
branches:
- main
- nightly*
jobs:
#Reuse ci.yml workflow on main branch and upload artifacts to release page
reuse_main_ci:
uses: ./.github/workflows/ci.yml
secrets: inherit
upload_nightly_builds:
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ macos-latest]
python-version: [ 3.8 ]
needs: reuse_main_ci
env:
TAG_NAME: 'nightly-build-test'
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Retrieve saved artifacts
uses: actions/download-artifact@v3
with:
path: installers/dist
- name: Display structure of downloaded files
run: ls -R
working-directory: installers/dist
- name: Set up Python
uses: actions/setup-python@v1
with:
python-version: ${{ matrix.python-version }}
- name: Rename artifacts
run: |
mv installers/dist/SasView-Installer-windows-*/setupSasView.exe installers/dist/setupSasView-nightly-Win64.exe
mv installers/dist/SasView-Installer-macos-*/SasView5.dmg installers/dist/SasView-nightly-MacOSX.dmg
mv installers/dist/SasView-Installer-ubuntu-*/sasview5.tar.gz installers/dist/SasView-nightly-Linux.tar.gz
- name: Notarize Release Build (OSX)
uses: GuillaumeFalourd/xcode-notarize@v1
with:
product-path: "installers/dist/SasView-nightly-MacOSX.dmg"
primary-bundle-id: "org.sasview.SasView5"
appstore-connect-username: ${{ secrets.NOTARIZATION_USERNAME }}
appstore-connect-password: ${{ secrets.NOTARIZATION_PASSWORD }}
verbose: True
- name: Staple Release Build (OSX)
if: ${{ startsWith(matrix.os, 'macos') }}
uses: devbotsxyz/xcode-staple@v1
with:
product-path: "installers/dist/SasView-nightly-MacOSX.dmg"
- name: Tag latest commit to recreate compressed files
uses: rickstaa/action-create-tag@v1
with:
tag: $TAG_NAME
tag_exists_error: false
- name: Upload Nightly Build Installer to GitHub releases
uses: ncipollo/release-action@v1
with:
draft: true
prerelease: true
allowUpdates: true
removeArtifacts: true
commit: ${{ github.sha }}
token: ${{ secrets.GITHUB_TOKEN }}
artifacts: "installers/dist/setupSasView-nightly-Win64.exe,
installers/dist/SasView-nightly-MacOSX.dmg,
installers/dist/SasView-nightly-Linux.tar.gz"
body: "Nightly build of main SasView branch"
name: $TAG_NAME
tag: $TAG_NAME