Skip to content

Build and Release Binaries for Linux (amd64, arm64), MacOS (Silicon arm64) and Windows (amd64) #2

Build and Release Binaries for Linux (amd64, arm64), MacOS (Silicon arm64) and Windows (amd64)

Build and Release Binaries for Linux (amd64, arm64), MacOS (Silicon arm64) and Windows (amd64) #2

Workflow file for this run

name: Build Release
on:
workflow_run:
workflows: ["Build Binaries for Windows (AMD64)"]
branches: [main]
types:
- completed
push:
tags:
- 'v*'
env:
GO_VERSION: 1.22
APP_NAME: wazuh-agent-status
jobs:
release:
name: Release
permissions: write-all
runs-on: ubuntu-latest
steps:
- name: Get the version
id: get_version
run: echo ::set-output name=VERSION::${GITHUB_REF#refs/tags/}
- name: Create Release
id: create_release
uses: actions/create-release@v1
if: startsWith(github.ref, 'refs/tags/v')
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
tag_name: ${{ steps.get_version.outputs.VERSION }}
release_name: Release ${{ steps.get_version.outputs.VERSION }}
draft: false
prerelease: false
- name: Download Artifacts
uses: actions/download-artifact@v4
with:
path: ./dist
- name: Create Release and Upload Assets
uses: softprops/action-gh-release@v1
if: startsWith(github.ref, 'refs/tags/v')
with:
files: '**'
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}