Merge pull request #46 from MannLabs/development #28
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
on: | |
push: | |
branches: [ main ] | |
workflow_dispatch: | |
name: Release on GitHub | |
jobs: | |
Version_Bumped: | |
runs-on: ubuntu-latest | |
outputs: | |
version: ${{ steps.master_version_bumped.outputs.version }} | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v3 | |
- uses: conda-incubator/setup-miniconda@v2 | |
with: | |
auto-update-conda: true | |
python-version: ${{ matrix.python-version }} | |
- name: Master version bumped | |
id: master_version_bumped | |
shell: bash -l {0} | |
run: | | |
cd misc | |
. ./check_version.sh | |
echo "version=$current_version" >> $GITHUB_OUTPUT | |
Create_Draft_On_GitHub: | |
runs-on: ubuntu-latest | |
needs: Version_Bumped | |
outputs: | |
upload_url: ${{ steps.draft_release.outputs.upload_url }} | |
steps: | |
- name: Draft Release | |
id: draft_release | |
uses: actions/create-release@v1 | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
with: | |
tag_name: v${{ needs.Version_Bumped.outputs.version }} | |
release_name: v${{ needs.Version_Bumped.outputs.version }} | |
draft: true | |
prerelease: false | |
Create_MacOS_GUI: | |
runs-on: macos-latest | |
needs: [Create_Draft_On_GitHub, Version_Bumped] | |
steps: | |
- name : Checkout code | |
uses: actions/checkout@v3 | |
- name: Setup Node.js | |
uses: actions/setup-node@v2 | |
- name: Install dependencies | |
run: | | |
cd gui | |
npm install | |
- name: Build GUI | |
run: | | |
cd gui | |
npm run make | |
- name: List output files | |
run: | | |
ls gui/out/make/zip/darwin/x64 | |
- name: Upload a Release Asset | |
uses: actions/upload-release-asset@v1 | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
with: | |
upload_url: ${{ needs.Create_Draft_On_GitHub.outputs.upload_url }} | |
asset_path: gui/out/make/zip/darwin/x64/alphadia-gui-darwin-x64-${{ needs.Version_Bumped.outputs.version }}.zip | |
asset_name: alphadia-gui-darwin-x64-${{ needs.Version_Bumped.outputs.version }}.zip | |
asset_content_type: application/zip | |
Create_Win_GUI: | |
runs-on: windows-latest | |
needs: [Create_Draft_On_GitHub, Version_Bumped] | |
steps: | |
- name : Checkout code | |
uses: actions/checkout@v3 | |
- name: Setup Node.js | |
uses: actions/setup-node@v2 | |
- name: Install dependencies | |
run: | | |
cd gui | |
npm install | |
- name: Build GUI | |
run: | | |
cd gui | |
npm run make | |
- name: List output files | |
run: | | |
ls -R gui/out/make | |
- name: Upload a Release Asset | |
uses: actions/upload-release-asset@v1 | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
with: | |
upload_url: ${{ needs.Create_Draft_On_GitHub.outputs.upload_url }} | |
asset_path: gui/out/make/zip/win32/x64/alphadia-gui-win32-x64-${{ needs.Version_Bumped.outputs.version }}.zip | |
asset_name: alphadia-gui-win32-x64-${{ needs.Version_Bumped.outputs.version }}.zip | |
asset_content_type: application/zip |