forked from hashicorp/vault
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Try creating a simple release script in case it works
- Loading branch information
1 parent
a7cc786
commit bd92c27
Showing
1 changed file
with
51 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |