From 618188964446930a9c692b531410dad34c2c8950 Mon Sep 17 00:00:00 2001 From: lowell-criteo <105206294+lowell-criteo@users.noreply.github.com> Date: Wed, 22 Jan 2025 17:45:07 +0100 Subject: [PATCH] Create release.yml Try creating a simple release script in case it works --- .github/workflows/release.yml | 51 +++++++++++++++++++++++++++++++++++ 1 file changed, 51 insertions(+) create mode 100644 .github/workflows/release.yml diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml new file mode 100644 index 000000000000..c5a762598454 --- /dev/null +++ b/.github/workflows/release.yml @@ -0,0 +1,51 @@ +name: Build and Publish Vault Release (Universal Linux Binary) + +on: + release: + types: [created] + +jobs: + build-and-publish: + runs-on: ubuntu-latest + + steps: + # Checkout the repository + - name: Checkout code + uses: actions/checkout@v3 + + # Set up Go environment + - name: Set up Go + uses: actions/setup-go@v4 + with: + go-version: '1.20' + + # Bootstrap the environment + - name: Bootstrap the environment + run: | + make bootstrap + + # Build Vault binary with UI + - name: Build Vault with UI + run: | + make static-dist dev-ui + env: + CGO_ENABLED: 0 + GOOS: linux + GOARCH: amd64 + + # Create a tar.gz package + - name: Create tar.gz + run: | + mkdir -p release + tar -czvf release/vault-${{ github.ref_name }}.tar.gz bin/vault + env: + BUILD_VERSION: ${{ github.ref_name }} + + # Upload the artifact to the release + - name: Upload release artifact + uses: actions/upload-release-asset@v1 + with: + upload_url: ${{ github.event.release.upload_url }} + asset_path: release/vault-${{ github.ref_name }}.tar.gz + asset_name: vault-${{ github.ref_name }}.tar.gz + asset_content_type: application/gzip