ci: build msi package on prerelease action, explicit job dependency (#1941)

This commit is contained in:
mmetc 2022-12-22 14:36:41 +01:00 committed by GitHub
parent 79aecac2da
commit 80e6a2e60b
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 9 additions and 11 deletions

View file

@ -1,14 +1,9 @@
name: build-msi (windows)
on:
pull_request:
branches:
- master
- releases/**
paths-ignore:
- 'docs/**'
- 'mkdocs.yml'
- 'README.md'
release:
types:
- prereleased
jobs:
get_latest_release:
@ -29,6 +24,7 @@ jobs:
build:
name: Build
runs-on: windows-2019
needs: get_latest_release
steps:
- name: Set up Go 1.19
uses: actions/setup-go@v3
@ -38,7 +34,7 @@ jobs:
- name: Check out code into the Go module directory
uses: actions/checkout@v2
- id: set_release_in_env
run: echo "BUILD_VERSION=${{ jobs.get_latest_release.outputs.tag_name }}" >> $env:GITHUB_ENV
run: echo "BUILD_VERSION=${{ needs.get_latest_release.outputs.tag_name }}" >> $env:GITHUB_ENV
- name: Build
run: make windows_installer
- name: Upload MSI

View file

@ -26,6 +26,7 @@ jobs:
dispatch:
name: dispatch to hub-tests
runs-on: ubuntu-latest
needs: get_latest_release
steps:
- name: Repository Dispatch
uses: peter-evans/repository-dispatch@v1
@ -33,4 +34,4 @@ jobs:
token: ${{ secrets.DISPATCH_TOKEN }}
event-type: create_branch
repository: crowdsecurity/hub
client-payload: '{"version": "${{ jobs.get_latest_release.outputs.tag_name }}"}'
client-payload: '{"version": "${{ needs.get_latest_release.outputs.tag_name }}"}'

View file

@ -26,6 +26,7 @@ jobs:
dispatch:
name: dispatch to hub-tests
runs-on: ubuntu-latest
needs: get_latest_release
steps:
- name: Repository Dispatch
uses: peter-evans/repository-dispatch@v1
@ -33,4 +34,4 @@ jobs:
token: ${{ secrets.DISPATCH_TOKEN }}
event-type: delete_branch
repository: crowdsecurity/hub
client-payload: '{"version": "${{ jobs.get_latest_release.outputs.tag_name }}"}'
client-payload: '{"version": "${{ needs.get_latest_release.outputs.tag_name }}"}'