This commit is contained in:
Yair Morgenstern 2021-01-19 22:23:31 +02:00 committed by GitHub
parent f6f06ceace
commit 7d4736be80
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -7,7 +7,7 @@ on:
# Triggers the workflow on push or pull request events but only for the master branch
push:
tags:
- '*'
- '*' # This doesn't mean that it HAS to have a tag, only that the workflow triggers when we push a tag
branches: [ master ]
pull_request:
branches: [ master ]
@ -25,15 +25,6 @@ jobs:
# Steps represent a sequence of tasks that will be executed as part of the job
steps:
- name: Get tag
if: github.event_name == 'push' && contains(github.ref, 'refs/tags/')
id: tag
uses: dawidd6/action-get-tag@v1
- name: Use tag
if: github.event_name == 'push' && contains(github.ref, 'refs/tags/')
run: echo ${{steps.tag.outputs.tag}}
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
- uses: actions/checkout@v2
@ -49,8 +40,13 @@ jobs:
run: ./gradlew tests:test
- name: Get tag # We can then get the tag using ${{steps.tag.outputs.tag}} as below
if: github.event_name == 'push' && contains(github.ref, 'refs/tags/')
id: tag
uses: dawidd6/action-get-tag@v1
- name: release
if: github.event_name == 'release'
if: github.event_name == 'push' && contains(github.ref, 'refs/tags/')
run: |
echo this is a release!
wget -O jdk-windows-64.zip https://github.com/ojdkbuild/ojdkbuild/releases/download/java-1.8.0-openjdk-1.8.0.232-1.b09/java-1.8.0-openjdk-1.8.0.232-1.b09.ojdkbuild.windows.x86_64.zip > /dev/null;