mirror of
https://github.com/awatertrevi/infisical.git
synced 2026-10-06 09:26:47 +00:00
Update build-binaries.yml
This commit is contained in:
@@ -1,7 +1,12 @@
|
|||||||
name: Build Binaries and Deploy
|
name: Build Binaries and Deploy
|
||||||
|
|
||||||
on:
|
on:
|
||||||
push:
|
workflow_dispatch:
|
||||||
|
inputs:
|
||||||
|
version:
|
||||||
|
description: "Version number"
|
||||||
|
required: true
|
||||||
|
type: string
|
||||||
|
|
||||||
defaults:
|
defaults:
|
||||||
run:
|
run:
|
||||||
@@ -16,24 +21,14 @@ jobs:
|
|||||||
os: [linux, win]
|
os: [linux, win]
|
||||||
include:
|
include:
|
||||||
- os: linux
|
- os: linux
|
||||||
target: node18-linux
|
target: node20-linux
|
||||||
- os: win
|
- os: win
|
||||||
target: node18-win
|
target: node20-win
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout code
|
- name: Checkout code
|
||||||
uses: actions/checkout@v3
|
uses: actions/checkout@v3
|
||||||
|
|
||||||
- name: Extract version from tag
|
|
||||||
id: extract_version
|
|
||||||
run: |
|
|
||||||
if [[ $GITHUB_REF == refs/tags/* ]]; then
|
|
||||||
VERSION=${GITHUB_REF#refs/tags/infisical-standalone/v}
|
|
||||||
else
|
|
||||||
VERSION=$(git rev-parse --short HEAD)
|
|
||||||
fi
|
|
||||||
echo "version=$VERSION" >> $GITHUB_OUTPUT
|
|
||||||
|
|
||||||
- name: Set up Node.js
|
- name: Set up Node.js
|
||||||
uses: actions/setup-node@v3
|
uses: actions/setup-node@v3
|
||||||
with:
|
with:
|
||||||
@@ -54,9 +49,9 @@ jobs:
|
|||||||
- name: Package into node binary
|
- name: Package into node binary
|
||||||
run: |
|
run: |
|
||||||
if [ "${{ matrix.os }}" != "linux" ]; then
|
if [ "${{ matrix.os }}" != "linux" ]; then
|
||||||
pkg --no-bytecode --public-packages "*" --public --target ${{ matrix.target }}-${{ matrix.arch }} --output ./binary/infisical-standalone-${{ matrix.os }}-${{ matrix.arch }} .
|
pkg --no-bytecode --public-packages "*" --public --compress Brotli --target ${{ matrix.target }}-${{ matrix.arch }} --output ./binary/infisical-standalone-${{ matrix.os }}-${{ matrix.arch }} .
|
||||||
else
|
else
|
||||||
pkg --no-bytecode --public-packages "*" --public --target ${{ matrix.target }}-${{ matrix.arch }} --output ./binary/infisical-standalone .
|
pkg --no-bytecode --public-packages "*" --public --compress Brotli --target ${{ matrix.target }}-${{ matrix.arch }} --output ./binary/infisical-standalone .
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Set up .deb package structure (Debian/Ubuntu only)
|
# Set up .deb package structure (Debian/Ubuntu only)
|
||||||
@@ -70,10 +65,10 @@ jobs:
|
|||||||
|
|
||||||
- name: Create control file
|
- name: Create control file
|
||||||
if: matrix.os == 'linux'
|
if: matrix.os == 'linux'
|
||||||
run: | # Version: Is hardcoded to 3.0.0 (should be steps.extract_version.outputs.versio)
|
run: |
|
||||||
cat <<EOF > infisical-standalone/DEBIAN/control
|
cat <<EOF > infisical-standalone/DEBIAN/control
|
||||||
Package: infisical-standalone
|
Package: infisical-standalone
|
||||||
Version: 3.0.0
|
Version: ${{ github.event.inputs.version }}
|
||||||
Section: base
|
Section: base
|
||||||
Priority: optional
|
Priority: optional
|
||||||
Architecture: ${{ matrix.arch == 'x64' && 'amd64' || matrix.arch }}
|
Architecture: ${{ matrix.arch == 'x64' && 'amd64' || matrix.arch }}
|
||||||
@@ -92,7 +87,7 @@ jobs:
|
|||||||
- run: pip install --upgrade cloudsmith-cli
|
- run: pip install --upgrade cloudsmith-cli
|
||||||
|
|
||||||
# Publish .deb file to Cloudsmith (Debian/Ubuntu only)
|
# Publish .deb file to Cloudsmith (Debian/Ubuntu only)
|
||||||
- name: Publish to Cloudsmith (Linux)
|
- name: Publish to Cloudsmith (Debian/Ubuntu)
|
||||||
if: matrix.os == 'linux'
|
if: matrix.os == 'linux'
|
||||||
working-directory: ./backend
|
working-directory: ./backend
|
||||||
run: cloudsmith push deb --republish --no-wait-for-sync --api-key=${{ secrets.CLOUDSMITH_API_KEY }} infisical/infisical-standalone/any-distro/any-version ./binary/infisical-standalone-${{ matrix.arch }}.deb
|
run: cloudsmith push deb --republish --no-wait-for-sync --api-key=${{ secrets.CLOUDSMITH_API_KEY }} infisical/infisical-standalone/any-distro/any-version ./binary/infisical-standalone-${{ matrix.arch }}.deb
|
||||||
@@ -101,4 +96,4 @@ jobs:
|
|||||||
- name: Publish to Cloudsmith (Windows)
|
- name: Publish to Cloudsmith (Windows)
|
||||||
if: matrix.os == 'win'
|
if: matrix.os == 'win'
|
||||||
working-directory: ./backend
|
working-directory: ./backend
|
||||||
run: cloudsmith push raw infisical/infisical-standalone ./binary/infisical-standalone-${{ matrix.os }}-${{ matrix.arch }}.exe --republish --no-wait-for-sync --version 3.0.0 --api-key ${{ secrets.CLOUDSMITH_API_KEY }}
|
run: cloudsmith push raw infisical/infisical-standalone ./binary/infisical-standalone-${{ matrix.os }}-${{ matrix.arch }}.exe --republish --no-wait-for-sync --version ${{ github.event.inputs.version }} --api-key ${{ secrets.CLOUDSMITH_API_KEY }}
|
||||||
|
|||||||
Reference in New Issue
Block a user