From 28d042691a8824bcf6aa15d7c909d9b440d4a215 Mon Sep 17 00:00:00 2001 From: Richard Beare Date: Sat, 15 May 2021 15:30:49 +1000 Subject: [PATCH] actions to manual only, tag detected automatically. --- .github/workflows/main.yml | 41 +++++++++++++++++++++----------------- 1 file changed, 23 insertions(+), 18 deletions(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 15f8337..cc1f57a 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -1,14 +1,14 @@ # This is a basic workflow to help you get started with Actions -name: CI +name: BUILD # Controls when the action will run. on: # Triggers the workflow on push or pull request events but only for the master branch - push: - branches: [ master ] - pull_request: - branches: [ master ] + #push: + # branches: [ master ] + #pull_request: + # branches: [ master ] # Allows you to run this workflow manually from the Actions tab workflow_dispatch: @@ -23,11 +23,15 @@ jobs: # Steps represent a sequence of tasks that will be executed as part of the job steps: # Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it + - uses: oprypin/find-latest-tag@v1 + with: + repository: DevelopmentalImagingMCRI/mantis + releases-only: true + id: tagfinder - uses: actions/checkout@v2 with: path: 'mantis' submodules: 'true' - # Runs a set of commands using the runners shell - name: Run ubuntu build run: | @@ -44,16 +48,8 @@ jobs: with: files: 'mantis_ubuntu.tgz' repo-token: ${{ secrets.GITHUB_TOKEN }} - release-tag: v1.0 + release-tag: ${{ steps.tagfinder.outputs.tag }} -# - uses: meeDamian/github-release@2.0 -# with: -# token: ${{ secrets.GITHUB_TOKEN }} -# tag: 'v1.0' -# files: 'mantis_ubuntu.tgz' -# gzip: 'false' -# allow_override: 'true' - buildOSX: # The type of runner that the job will run on runs-on: macos-latest @@ -61,11 +57,15 @@ jobs: # Steps represent a sequence of tasks that will be executed as part of the job steps: # Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it + - uses: oprypin/find-latest-tag@v1 + with: + repository: DevelopmentalImagingMCRI/mantis + releases-only: true + id: tagfinder - uses: actions/checkout@v2 with: path: 'mantis' submodules: 'true' - # Runs a set of commands using the runners shell - name: Run ubuntu build run: | @@ -82,12 +82,17 @@ jobs: with: files: 'mantis_osx.tgz' repo-token: ${{ secrets.GITHUB_TOKEN }} - release-tag: v1.0 + release-tag: ${{ steps.tagfinder.outputs.tag }} buildWindows: runs-on: windows-latest steps: # Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it + - uses: oprypin/find-latest-tag@v1 + with: + repository: DevelopmentalImagingMCRI/mantis + releases-only: true + id: tagfinder - uses: actions/checkout@v2 with: path: 'mantis' @@ -116,4 +121,4 @@ jobs: with: files: 'mantis_windows.zip' repo-token: ${{ secrets.GITHUB_TOKEN }} - release-tag: v1.0 + release-tag: ${{ steps.tagfinder.outputs.tag }}