ci: build msi package on prerelease action, explicit job dependency (#1941)
This commit is contained in:
parent
79aecac2da
commit
80e6a2e60b
14
.github/workflows/ci-windows-build-msi.yml
vendored
14
.github/workflows/ci-windows-build-msi.yml
vendored
|
@ -1,14 +1,9 @@
|
||||||
name: build-msi (windows)
|
name: build-msi (windows)
|
||||||
|
|
||||||
on:
|
on:
|
||||||
pull_request:
|
release:
|
||||||
branches:
|
types:
|
||||||
- master
|
- prereleased
|
||||||
- releases/**
|
|
||||||
paths-ignore:
|
|
||||||
- 'docs/**'
|
|
||||||
- 'mkdocs.yml'
|
|
||||||
- 'README.md'
|
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
get_latest_release:
|
get_latest_release:
|
||||||
|
@ -29,6 +24,7 @@ jobs:
|
||||||
build:
|
build:
|
||||||
name: Build
|
name: Build
|
||||||
runs-on: windows-2019
|
runs-on: windows-2019
|
||||||
|
needs: get_latest_release
|
||||||
steps:
|
steps:
|
||||||
- name: Set up Go 1.19
|
- name: Set up Go 1.19
|
||||||
uses: actions/setup-go@v3
|
uses: actions/setup-go@v3
|
||||||
|
@ -38,7 +34,7 @@ jobs:
|
||||||
- name: Check out code into the Go module directory
|
- name: Check out code into the Go module directory
|
||||||
uses: actions/checkout@v2
|
uses: actions/checkout@v2
|
||||||
- id: set_release_in_env
|
- 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
|
- name: Build
|
||||||
run: make windows_installer
|
run: make windows_installer
|
||||||
- name: Upload MSI
|
- name: Upload MSI
|
||||||
|
|
|
@ -26,6 +26,7 @@ jobs:
|
||||||
dispatch:
|
dispatch:
|
||||||
name: dispatch to hub-tests
|
name: dispatch to hub-tests
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
|
needs: get_latest_release
|
||||||
steps:
|
steps:
|
||||||
- name: Repository Dispatch
|
- name: Repository Dispatch
|
||||||
uses: peter-evans/repository-dispatch@v1
|
uses: peter-evans/repository-dispatch@v1
|
||||||
|
@ -33,4 +34,4 @@ jobs:
|
||||||
token: ${{ secrets.DISPATCH_TOKEN }}
|
token: ${{ secrets.DISPATCH_TOKEN }}
|
||||||
event-type: create_branch
|
event-type: create_branch
|
||||||
repository: crowdsecurity/hub
|
repository: crowdsecurity/hub
|
||||||
client-payload: '{"version": "${{ jobs.get_latest_release.outputs.tag_name }}"}'
|
client-payload: '{"version": "${{ needs.get_latest_release.outputs.tag_name }}"}'
|
||||||
|
|
|
@ -26,6 +26,7 @@ jobs:
|
||||||
dispatch:
|
dispatch:
|
||||||
name: dispatch to hub-tests
|
name: dispatch to hub-tests
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
|
needs: get_latest_release
|
||||||
steps:
|
steps:
|
||||||
- name: Repository Dispatch
|
- name: Repository Dispatch
|
||||||
uses: peter-evans/repository-dispatch@v1
|
uses: peter-evans/repository-dispatch@v1
|
||||||
|
@ -33,4 +34,4 @@ jobs:
|
||||||
token: ${{ secrets.DISPATCH_TOKEN }}
|
token: ${{ secrets.DISPATCH_TOKEN }}
|
||||||
event-type: delete_branch
|
event-type: delete_branch
|
||||||
repository: crowdsecurity/hub
|
repository: crowdsecurity/hub
|
||||||
client-payload: '{"version": "${{ jobs.get_latest_release.outputs.tag_name }}"}'
|
client-payload: '{"version": "${{ needs.get_latest_release.outputs.tag_name }}"}'
|
||||||
|
|
Loading…
Reference in a new issue