Skip to content

Commit

Permalink
Create release.yml
Browse files Browse the repository at this point in the history
Try creating a simple release script in case it works
  • Loading branch information
lowell-criteo committed Jan 22, 2025
1 parent a7cc786 commit bd92c27
Showing 1 changed file with 51 additions and 0 deletions.
51 changes: 51 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -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

0 comments on commit bd92c27

Please # to comment.