diff --git a/.github/workflows/ci-windows-build-msi.yml b/.github/workflows/ci-windows-build-msi.yml index e4bc36c55..13119da1e 100644 --- a/.github/workflows/ci-windows-build-msi.yml +++ b/.github/workflows/ci-windows-build-msi.yml @@ -1,29 +1,26 @@ name: build-msi (windows) on: + release: + types: + - prereleased + push: + branches: + - master + - releases/** + paths: + - windows/installer/*.wxs + - .github/workflows/ci-windows-build-msi.yml pull_request: branches: - master - releases/** - paths-ignore: - - 'docs/**' - - 'mkdocs.yml' - - 'README.md' + paths: + - windows/installer/*.wxs + - .github/workflows/ci-windows-build-msi.yml + 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 runs-on: windows-2019 @@ -34,9 +31,9 @@ jobs: go-version: 1.19 id: go - 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 + uses: actions/checkout@v3 + with: + fetch-depth: 0 - name: Build run: make windows_installer - name: Upload MSI diff --git a/.github/workflows/dispatch_ci_hub.yaml b/.github/workflows/dispatch_ci_hub.yaml deleted file mode 100644 index 6c1e1a744..000000000 --- a/.github/workflows/dispatch_ci_hub.yaml +++ /dev/null @@ -1,22 +0,0 @@ -name: Dispatch to hub when creating pre-release - -on: - push: - # branches to consider in the event; optional, defaults to all - branches: - - master - - releases/** - -jobs: - dispatch: - name: dispatch to hub-tests - runs-on: ubuntu-latest - steps: - - name: Repository Dispatch - uses: peter-evans/repository-dispatch@v1 - if: ${{ github.repository_owner == 'crowdsecurity' }} - with: - token: ${{ secrets.DISPATCH_TOKEN }} - event-type: trigger_ci_hub - repository: crowdsecurity/hub - client-payload: '{"version": "${{ steps.keydb.outputs.release }}"}' diff --git a/.github/workflows/dispatch_create_branch_hub.yaml b/.github/workflows/dispatch_create_branch_hub.yaml deleted file mode 100644 index 5a5209b64..000000000 --- a/.github/workflows/dispatch_create_branch_hub.yaml +++ /dev/null @@ -1,34 +0,0 @@ -name: Dispatch to hub when creating pre-release - -on: - release: - 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: - - name: Repository Dispatch - uses: peter-evans/repository-dispatch@v1 - with: - token: ${{ secrets.DISPATCH_TOKEN }} - event-type: create_branch - repository: crowdsecurity/hub - client-payload: '{"version": "${{ jobs.get_latest_release.outputs.tag_name }}"}' diff --git a/.github/workflows/dispatch_delete_branch_hub.yaml b/.github/workflows/dispatch_delete_branch_hub.yaml deleted file mode 100644 index 9582457a6..000000000 --- a/.github/workflows/dispatch_delete_branch_hub.yaml +++ /dev/null @@ -1,34 +0,0 @@ -name: Dispatch to hub when deleting pre-release - -on: - release: - 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: - - name: Repository Dispatch - uses: peter-evans/repository-dispatch@v1 - with: - token: ${{ secrets.DISPATCH_TOKEN }} - event-type: delete_branch - repository: crowdsecurity/hub - client-payload: '{"version": "${{ jobs.get_latest_release.outputs.tag_name }}"}' diff --git a/.github/workflows/release_publish-package.yml b/.github/workflows/release_publish-package.yml index 0293343d4..8f19752cd 100644 --- a/.github/workflows/release_publish-package.yml +++ b/.github/workflows/release_publish-package.yml @@ -18,6 +18,8 @@ jobs: id: go - name: Check out code into the Go module directory uses: actions/checkout@v3 + with: + fetch-depth: 0 - name: Build the binaries run: make release - name: Upload to release @@ -37,6 +39,8 @@ jobs: id: go - name: Check out code into the Go module directory uses: actions/checkout@v3 + with: + fetch-depth: 0 - name: Build the binaries run: | make release BUILD_STATIC=yes diff --git a/windows/installer/product.wxs b/windows/installer/product.wxs index 5f37f7348..408178cda 100644 --- a/windows/installer/product.wxs +++ b/windows/installer/product.wxs @@ -168,7 +168,6 @@ -