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
|
||||
container: muslcc/x86_64:i686-linux-musl
|
||||
outputs:
|
||||
version: ${{ steps.build_socat.outputs.PACKAGED_NAME }}
|
||||
version: ${{ steps.build_socat.outputs.PACKAGED_VERSION }}
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v2
|
||||
|
@ -137,13 +137,13 @@ jobs:
|
|||
|
||||
- name: Tag Release
|
||||
run: |
|
||||
git tag "${{ needs.build-x86.outputs.version }}"
|
||||
git push origin "${{ needs.build-x86.outputs.version }}"
|
||||
git tag "socat-v${{ needs.build-x86.outputs.version }}"
|
||||
git push origin "socat-v${{ needs.build-x86.outputs.version }}"
|
||||
|
||||
- name: Create Release
|
||||
uses: ncipollo/release-action@v1
|
||||
with:
|
||||
name: ${{ needs.build-x86.outputs.version }}
|
||||
tag: ${{ needs.build-x86.outputs.version }}
|
||||
name: socat-v{{ needs.build-x86.outputs.version }}
|
||||
tag: socat-v${{ needs.build-x86.outputs.version }}
|
||||
artifacts: "/tmp/releases/*/*"
|
||||
token: ${{ secrets.GITHUB_TOKEN }}
|
|
@ -1,12 +1,16 @@
|
|||
#!/bin/bash
|
||||
set -e
|
||||
set -x
|
||||
set -o pipefail
|
||||
if [ -z "$GITHUB_WORKSPACE" ];then
|
||||
echo "GITHUB_WORKSPACE environemnt variable not set!"
|
||||
exit 1
|
||||
fi
|
||||
if [ "$#" -ne 1 ];then
|
||||
echo "Usage: ${0} [x86|x86_64|armhf|aarch64]"
|
||||
echo "Example: ${0} x86_64"
|
||||
exit 1
|
||||
fi
|
||||
set -e
|
||||
set -o pipefail
|
||||
set -x
|
||||
source $GITHUB_WORKSPACE/build/lib.sh
|
||||
init_lib "$1"
|
||||
|
||||
|
@ -33,11 +37,13 @@ main() {
|
|||
build_socat
|
||||
local version
|
||||
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}"
|
||||
echo "[+] Finished building socat ${CURRENT_ARCH}"
|
||||
|
||||
echo ::set-output name=PACKAGED_NAME::"socat${version}"
|
||||
echo ::set-output name=PACKAGED_NAME_PATH::"${OUTPUT_DIRECTORY}/*"
|
||||
echo ::set-output name=PACKAGED_VERSION::"${version_number}"
|
||||
}
|
||||
|
||||
main
|
||||
|
|
Loading…
Reference in a new issue