parent
dbc06d430f
commit
b561a370cd
19
.github/workflows/ci-windows-build-msi.yml
vendored
19
.github/workflows/ci-windows-build-msi.yml
vendored
|
@ -11,6 +11,18 @@ on:
|
|||
- 'README.md'
|
||||
|
||||
jobs:
|
||||
get_latest_release:
|
||||
name: get_latest_release
|
||||
runs-on: ubuntu-latest
|
||||
permissions:
|
||||
contents: read
|
||||
steps:
|
||||
- id: get_latest_release
|
||||
uses: cardinalby/git-get-release-action@cedef2faf69cb7c55b285bad07688d04430b7ada
|
||||
env:
|
||||
GITHUB_TOKEN: ${{ github.token }}
|
||||
with:
|
||||
latest: true
|
||||
|
||||
build:
|
||||
name: Build
|
||||
|
@ -23,13 +35,8 @@ jobs:
|
|||
id: go
|
||||
- name: Check out code into the Go module directory
|
||||
uses: actions/checkout@v2
|
||||
- id: get_latest_release
|
||||
uses: pozetroninc/github-action-get-latest-release@master
|
||||
with:
|
||||
repository: crowdsecurity/crowdsec
|
||||
excludes: draft
|
||||
- id: set_release_in_env
|
||||
run: echo "BUILD_VERSION=${{ steps.get_latest_release.outputs.release }}" >> $env:GITHUB_ENV
|
||||
run: echo "BUILD_VERSION=${{ jobs.get_latest_release.outputs.tag_name }}" >> $env:GITHUB_ENV
|
||||
- name: Build
|
||||
run: make windows_installer
|
||||
- name: Upload MSI
|
||||
|
|
|
@ -2,23 +2,33 @@ name: Dispatch to hub when creating pre-release
|
|||
|
||||
on:
|
||||
release:
|
||||
types: prereleased
|
||||
types:
|
||||
- prereleased
|
||||
|
||||
jobs:
|
||||
get_latest_release:
|
||||
name: get_latest_release
|
||||
runs-on: ubuntu-latest
|
||||
permissions:
|
||||
contents: read
|
||||
steps:
|
||||
- id: get_latest_release
|
||||
uses: cardinalby/git-get-release-action@cedef2faf69cb7c55b285bad07688d04430b7ada
|
||||
env:
|
||||
GITHUB_TOKEN: ${{ github.token }}
|
||||
with:
|
||||
latest: true
|
||||
draft: false
|
||||
prerelease: false
|
||||
|
||||
dispatch:
|
||||
name: dispatch to hub-tests
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- id: keydb
|
||||
uses: pozetroninc/github-action-get-latest-release@master
|
||||
with:
|
||||
owner: crowdsecurity
|
||||
repo: crowdsec
|
||||
excludes: prerelease, draft
|
||||
- name: Repository Dispatch
|
||||
uses: peter-evans/repository-dispatch@v1
|
||||
with:
|
||||
token: ${{ secrets.DISPATCH_TOKEN }}
|
||||
event-type: create_branch
|
||||
repository: crowdsecurity/hub
|
||||
client-payload: '{"version": "${{ steps.keydb.outputs.release }}"}'
|
||||
client-payload: '{"version": "${{ jobs.get_latest_release.outputs.tag_name }}"}'
|
||||
|
|
|
@ -2,23 +2,33 @@ name: Dispatch to hub when deleting pre-release
|
|||
|
||||
on:
|
||||
release:
|
||||
types: deleted
|
||||
types:
|
||||
- deleted
|
||||
|
||||
jobs:
|
||||
get_latest_release:
|
||||
name: get_latest_release
|
||||
runs-on: ubuntu-latest
|
||||
permissions:
|
||||
contents: read
|
||||
steps:
|
||||
- id: get_latest_release
|
||||
uses: cardinalby/git-get-release-action@cedef2faf69cb7c55b285bad07688d04430b7ada
|
||||
env:
|
||||
GITHUB_TOKEN: ${{ github.token }}
|
||||
with:
|
||||
latest: true
|
||||
draft: false
|
||||
prerelease: false
|
||||
|
||||
dispatch:
|
||||
name: dispatch to hub-tests
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- id: keydb
|
||||
uses: pozetroninc/github-action-get-latest-release@master
|
||||
with:
|
||||
owner: crowdsecurity
|
||||
repo: crowdsec
|
||||
excludes: prerelease, draft
|
||||
- name: Repository Dispatch
|
||||
uses: peter-evans/repository-dispatch@v1
|
||||
with:
|
||||
token: ${{ secrets.DISPATCH_TOKEN }}
|
||||
event-type: delete_branch
|
||||
repository: crowdsecurity/hub
|
||||
client-payload: '{"version": "${{ steps.keydb.outputs.release }}"}'
|
||||
client-payload: '{"version": "${{ jobs.get_latest_release.outputs.tag_name }}"}'
|
||||
|
|
|
@ -3,7 +3,8 @@ name: build
|
|||
|
||||
on:
|
||||
release:
|
||||
types: prereleased
|
||||
types:
|
||||
- prereleased
|
||||
|
||||
jobs:
|
||||
build:
|
||||
|
|
Loading…
Reference in a new issue