Updated socat workflow
This commit is contained in:
parent
7e3ae1499c
commit
687716cb1a
2 changed files with 14 additions and 8 deletions
10
.github/workflows/build-socat.yml
vendored
10
.github/workflows/build-socat.yml
vendored
|
@ -7,7 +7,7 @@ jobs:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
container: muslcc/x86_64:i686-linux-musl
|
container: muslcc/x86_64:i686-linux-musl
|
||||||
outputs:
|
outputs:
|
||||||
version: ${{ steps.build_socat.outputs.PACKAGED_NAME }}
|
version: ${{ steps.build_socat.outputs.PACKAGED_VERSION }}
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout
|
- name: Checkout
|
||||||
uses: actions/checkout@v2
|
uses: actions/checkout@v2
|
||||||
|
@ -137,13 +137,13 @@ jobs:
|
||||||
|
|
||||||
- name: Tag Release
|
- name: Tag Release
|
||||||
run: |
|
run: |
|
||||||
git tag "${{ needs.build-x86.outputs.version }}"
|
git tag "socat-v${{ needs.build-x86.outputs.version }}"
|
||||||
git push origin "${{ needs.build-x86.outputs.version }}"
|
git push origin "socat-v${{ needs.build-x86.outputs.version }}"
|
||||||
|
|
||||||
- name: Create Release
|
- name: Create Release
|
||||||
uses: ncipollo/release-action@v1
|
uses: ncipollo/release-action@v1
|
||||||
with:
|
with:
|
||||||
name: ${{ needs.build-x86.outputs.version }}
|
name: socat-v{{ needs.build-x86.outputs.version }}
|
||||||
tag: ${{ needs.build-x86.outputs.version }}
|
tag: socat-v${{ needs.build-x86.outputs.version }}
|
||||||
artifacts: "/tmp/releases/*/*"
|
artifacts: "/tmp/releases/*/*"
|
||||||
token: ${{ secrets.GITHUB_TOKEN }}
|
token: ${{ secrets.GITHUB_TOKEN }}
|
|
@ -1,12 +1,16 @@
|
||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
set -e
|
if [ -z "$GITHUB_WORKSPACE" ];then
|
||||||
set -x
|
echo "GITHUB_WORKSPACE environemnt variable not set!"
|
||||||
set -o pipefail
|
exit 1
|
||||||
|
fi
|
||||||
if [ "$#" -ne 1 ];then
|
if [ "$#" -ne 1 ];then
|
||||||
echo "Usage: ${0} [x86|x86_64|armhf|aarch64]"
|
echo "Usage: ${0} [x86|x86_64|armhf|aarch64]"
|
||||||
echo "Example: ${0} x86_64"
|
echo "Example: ${0} x86_64"
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
set -e
|
||||||
|
set -o pipefail
|
||||||
|
set -x
|
||||||
source $GITHUB_WORKSPACE/build/lib.sh
|
source $GITHUB_WORKSPACE/build/lib.sh
|
||||||
init_lib "$1"
|
init_lib "$1"
|
||||||
|
|
||||||
|
@ -33,11 +37,13 @@ main() {
|
||||||
build_socat
|
build_socat
|
||||||
local version
|
local version
|
||||||
version=$(get_version "${BUILD_DIRECTORY}/socat/socat -V | grep 'socat version' | awk '{print \$3}'")
|
version=$(get_version "${BUILD_DIRECTORY}/socat/socat -V | grep 'socat version' | awk '{print \$3}'")
|
||||||
|
version_number=$(echo "$version" | cut -d"-" -f2)
|
||||||
cp "${BUILD_DIRECTORY}/socat/socat" "${OUTPUT_DIRECTORY}/socat${version}"
|
cp "${BUILD_DIRECTORY}/socat/socat" "${OUTPUT_DIRECTORY}/socat${version}"
|
||||||
echo "[+] Finished building socat ${CURRENT_ARCH}"
|
echo "[+] Finished building socat ${CURRENT_ARCH}"
|
||||||
|
|
||||||
echo ::set-output name=PACKAGED_NAME::"socat${version}"
|
echo ::set-output name=PACKAGED_NAME::"socat${version}"
|
||||||
echo ::set-output name=PACKAGED_NAME_PATH::"${OUTPUT_DIRECTORY}/*"
|
echo ::set-output name=PACKAGED_NAME_PATH::"${OUTPUT_DIRECTORY}/*"
|
||||||
|
echo ::set-output name=PACKAGED_VERSION::"${version_number}"
|
||||||
}
|
}
|
||||||
|
|
||||||
main
|
main
|
||||||
|
|
Loading…
Reference in a new issue