mirror of
https://github.com/awatertrevi/infisical.git
synced 2026-10-04 06:26:16 +00:00
Update build-binaries.yml
This commit is contained in:
@@ -1,12 +1,12 @@
|
|||||||
name: Build Binaries
|
name: Build Binaries
|
||||||
|
|
||||||
on:
|
on:
|
||||||
|
workflow_dispatch:
|
||||||
|
|
||||||
push:
|
push:
|
||||||
branches:
|
# run for standalone releases
|
||||||
- daniel/infisical-binary
|
tags:
|
||||||
pull_request:
|
- "infisical-standalone/v*.*.*"
|
||||||
branches:
|
|
||||||
- daniel/infisical-binary
|
|
||||||
|
|
||||||
defaults:
|
defaults:
|
||||||
run:
|
run:
|
||||||
@@ -29,6 +29,21 @@ jobs:
|
|||||||
- name: Checkout code
|
- name: Checkout code
|
||||||
uses: actions/checkout@v3
|
uses: actions/checkout@v3
|
||||||
|
|
||||||
|
- name: Extract version from tag
|
||||||
|
id: extract_version
|
||||||
|
run: |
|
||||||
|
# Get the tag name
|
||||||
|
TAG_NAME=$(git describe --tags)
|
||||||
|
# Extract the version part
|
||||||
|
VERSION=${TAG_NAME#infisical-standalone/v}
|
||||||
|
echo "Extracted version is $VERSION"
|
||||||
|
# Set the version as an output
|
||||||
|
echo "::set-output name=version::$VERSION"
|
||||||
|
|
||||||
|
- name: Version extration test
|
||||||
|
run: |
|
||||||
|
echo "The extracted version is ${{ steps.extract_version.outputs.version }}"
|
||||||
|
|
||||||
- name: Set up Node.js
|
- name: Set up Node.js
|
||||||
uses: actions/setup-node@v3
|
uses: actions/setup-node@v3
|
||||||
with:
|
with:
|
||||||
@@ -50,22 +65,23 @@ jobs:
|
|||||||
working-directory: ./backend
|
working-directory: ./backend
|
||||||
|
|
||||||
- name: Package into node binary
|
- name: Package into node binary
|
||||||
run: pkg --no-bytecode --public-packages "*" --public --compress=Brotli --target ${{ matrix.target }}-${{ matrix.arch }} --output ./binary/infisical-${{ matrix.os }}-${{ matrix.arch }} .
|
run: pkg --no-bytecode --public-packages "*" --public --target ${{ matrix.target }}-${{ matrix.arch }} --output ./binary/infisical-${{ matrix.os }}-${{ matrix.arch }} .
|
||||||
working-directory: ./backend
|
working-directory: ./backend
|
||||||
|
|
||||||
- name: List files
|
- name: List files
|
||||||
run: ls -la ./binary
|
run: ls -la ./binary
|
||||||
|
|
||||||
- name: Upload artifact (Linux)
|
- uses: actions/setup-python@v4
|
||||||
if: matrix.os == 'linux'
|
- run: pip install --upgrade cloudsmith-cli
|
||||||
uses: actions/upload-artifact@v3
|
|
||||||
with:
|
|
||||||
name: infisical-${{ matrix.os }}-${{ matrix.arch }}
|
|
||||||
path: backend/binary/infisical-${{ matrix.os }}-${{ matrix.arch }}
|
|
||||||
|
|
||||||
- name: Upload artifact (Windows)
|
- name: Publish to Cloudsmith (Linux)
|
||||||
|
if: matrix.os == 'linux'
|
||||||
|
run: cloudsmith push npm infisical/infisical-standalone backend/binary/infisical-${{ matrix.os }}-${{ matrix.arch }} --republish --no-wait-for-sync --version ${{ steps.extract_version.outputs.version }}
|
||||||
|
env:
|
||||||
|
CLOUDSMITH_API_KEY: ${{ secrets.CLOUDSMITH_API_KEY }}
|
||||||
|
|
||||||
|
- name: Publish to Cloudsmith (Windows)
|
||||||
if: matrix.os == 'win'
|
if: matrix.os == 'win'
|
||||||
uses: actions/upload-artifact@v3
|
run: cloudsmith push npm infisical/infisical-standalone backend/binary/infisical-${{ matrix.os }}-${{ matrix.arch }}.exe --republish --no-wait-for-sync --version ${{ steps.extract_version.outputs.version }}
|
||||||
with:
|
env:
|
||||||
name: infisical-${{ matrix.os }}-${{ matrix.arch }}
|
CLOUDSMITH_API_KEY: ${{ secrets.CLOUDSMITH_API_KEY }}
|
||||||
path: backend/binary/infisical-${{ matrix.os }}-${{ matrix.arch }}.exe
|
|
||||||
|
|||||||
Reference in New Issue
Block a user