diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 70782bb..1973eb3 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -3,7 +3,15 @@ name: Create Zeek release on: workflow_dispatch: inputs: - tag: + zeek_ref: + required: false + type: string + defaut: 'main' + build_zeek_ref: + required: false + type: string + default: 'main' + release_tag: required: true type: string @@ -20,6 +28,8 @@ jobs: steps: - name: Checkout build-zeek uses: actions/checkout@v3 + with: + ref: ${{ inputs.build_zeek_ref }} - name: Setup Go uses: actions/setup-go@v3 @@ -30,7 +40,7 @@ jobs: uses: actions/checkout@v3 with: repository: zeek/zeek - ref: ${{ inputs.tag }} + ref: ${{ inputs.zeek_ref }} fetch-depth: 1 submodules: recursive path: zeek @@ -93,6 +103,8 @@ jobs: - name: Finish packaging release run: ./release.sh + env: + RELEASE_TAG: ${{ inputs.release_tag }} shell: sh - name: Upload artifact @@ -107,5 +119,5 @@ jobs: repo_token: ${{ secrets.GITHUB_TOKEN }} file: zeek-*.zip file_glob: true - tag: ${{ github.ref }} + tag: ${{ inputs.release_tag }} overwrite: true diff --git a/release.sh b/release.sh index d8f8cf6..66d7375 100755 --- a/release.sh +++ b/release.sh @@ -85,4 +85,4 @@ for d in base policy site builtin-plugins; do cp -R $zeekpath/share/zeek/$d zeek/share/zeek/ done -$zip -r zeek-taghere.$(go env GOOS)-$(go env GOARCH).zip zeek +$zip -r zeek-$RELEASE_TAG.$(go env GOOS)-$(go env GOARCH).zip zeek