Skip to content

Commit

Permalink
Add release action on tag
Browse files Browse the repository at this point in the history
  • Loading branch information
adelosa committed Aug 20, 2023
1 parent f329cef commit 6ac3c08
Showing 1 changed file with 26 additions and 8 deletions.
34 changes: 26 additions & 8 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,10 @@ on: [push]

jobs:

build-dist:
build-distribution:
runs-on: ubuntu-latest
outputs:
VERSION: ${{ steps.version.outputs.version }}
VERSION: ${{ steps.version.outputs.VERSION }}
steps:
- name: Checkout main
uses: actions/checkout@v3
Expand All @@ -28,11 +28,11 @@ jobs:
uses: actions/upload-artifact@v3
with:
name: dist
path: ./dist/z390_${{ steps.version.outputs.version }}.zip
path: ./dist/z390_${{ steps.version.outputs.VERSION }}.zip

run-tests:
runs-on: ubuntu-latest
needs: build-dist
needs: build-distribution
steps:
- uses: actions/checkout@v3
- uses: actions/setup-java@v3
Expand All @@ -51,12 +51,12 @@ jobs:
cp dist/z390_${VERSION}/z390.jar .
Z390_PROJECT_ROOT="../dist/z390_${VERSION}" z390test/gradlew -p z390test test
env:
VERSION: ${{ needs.build-dist.outputs.VERSION }}
VERSION: ${{ needs.build-distribution.outputs.VERSION }}

run-windows:
run-windows-demo:
runs-on: windows-latest
needs:
- build-dist
- build-distribution
steps:
- uses: actions/checkout@v3
- uses: actions/setup-java@v3
Expand All @@ -75,4 +75,22 @@ jobs:
z390_%VERSION%\bat\RUNASMDEMOS.BAT
z390_%VERSION%\bat\RUNCBLDEMOS.BAT
env:
VERSION: ${{ needs.build-dist.outputs.VERSION }}
VERSION: ${{ needs.build-distribution.outputs.VERSION }}

create-release:
if: startsWith(github.ref, 'refs/tags/')
runs-on: ubuntu-latest
needs:
- build-distribution
- run-tests
- run-windows-demo
steps:
- name: get dist artefact
uses: actions/download-artifact@v3
with:
name: dist
- name: release
uses: softprops/action-gh-release@v1
with:
files: |
z390_${{ needs.build-distribution.outputs.VERSION }}.zip

0 comments on commit 6ac3c08

Please sign in to comment.