diff --git a/.github/workflows/ci-windows-build-msi.yml b/.github/workflows/ci-windows-build-msi.yml index 0e9056d0c..68a5e2a43 100644 --- a/.github/workflows/ci-windows-build-msi.yml +++ b/.github/workflows/ci-windows-build-msi.yml @@ -6,25 +6,9 @@ on: - prereleased jobs: - get_latest_release: - name: get_latest_release - runs-on: ubuntu-latest - permissions: - contents: read - outputs: - tag_name: ${{ steps.get_latest_release.tag_name }} - 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 - needs: get_latest_release steps: - name: Set up Go 1.19 uses: actions/setup-go@v3 @@ -32,9 +16,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=${{ needs.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 914bc06c5..000000000 --- a/.github/workflows/dispatch_create_branch_hub.yaml +++ /dev/null @@ -1,37 +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 - outputs: - tag_name: ${{ steps.get_latest_release.tag_name }} - 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 - needs: get_latest_release - 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": "${{ needs.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 2a080fa27..000000000 --- a/.github/workflows/dispatch_delete_branch_hub.yaml +++ /dev/null @@ -1,37 +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 - outputs: - tag_name: ${{ steps.get_latest_release.tag_name }} - 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 - needs: get_latest_release - 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": "${{ needs.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