Compare commits
5 commits
084573165c
...
23830523e9
Author | SHA1 | Date | |
---|---|---|---|
23830523e9 | |||
43a287b307 | |||
3471e70c66 | |||
26e3dea58c | |||
44daec460b |
2 changed files with 65 additions and 3 deletions
|
@ -40,7 +40,7 @@ jobs:
|
||||||
"https://git.seodisparate.com/api/v1/repos/stephenseo/break_interval/releases/tags/${GITHUB_REF_NAME}" \
|
"https://git.seodisparate.com/api/v1/repos/stephenseo/break_interval/releases/tags/${GITHUB_REF_NAME}" \
|
||||||
-H 'accept: application/json' -o "${THE_ACTION_WORKING_DIRECTORY}/release_info.json" 2>/dev/null
|
-H 'accept: application/json' -o "${THE_ACTION_WORKING_DIRECTORY}/release_info.json" 2>/dev/null
|
||||||
BUILD_ASSET_EXISTS=0
|
BUILD_ASSET_EXISTS=0
|
||||||
for asset in $(jq '.assets.[].name' < "${THE_ACTION_WORKING_DIRECTORY}/release_info.json"); do
|
for asset in $(jq '.assets.[].name' < "${THE_ACTION_WORKING_DIRECTORY}/release_info.json" | tr -d '"'); do
|
||||||
if [[ "$asset" == "$BUILD_ASSET_NAME" ]]; then
|
if [[ "$asset" == "$BUILD_ASSET_NAME" ]]; then
|
||||||
BUILD_ASSET_EXISTS=1
|
BUILD_ASSET_EXISTS=1
|
||||||
break
|
break
|
||||||
|
@ -78,7 +78,8 @@ jobs:
|
||||||
fi
|
fi
|
||||||
|
|
||||||
push-build-aarch64:
|
push-build-aarch64:
|
||||||
needs: ensure-release-exists
|
if: ${{ always() }}
|
||||||
|
needs: push-build-x86_64
|
||||||
concurrency:
|
concurrency:
|
||||||
group: push-build-group
|
group: push-build-group
|
||||||
runs-on: aarch64_archLinux
|
runs-on: aarch64_archLinux
|
||||||
|
@ -91,7 +92,7 @@ jobs:
|
||||||
"https://git.seodisparate.com/api/v1/repos/stephenseo/break_interval/releases/tags/${GITHUB_REF_NAME}" \
|
"https://git.seodisparate.com/api/v1/repos/stephenseo/break_interval/releases/tags/${GITHUB_REF_NAME}" \
|
||||||
-H 'accept: application/json' -o "${THE_ACTION_WORKING_DIRECTORY}/release_info.json" 2>/dev/null
|
-H 'accept: application/json' -o "${THE_ACTION_WORKING_DIRECTORY}/release_info.json" 2>/dev/null
|
||||||
BUILD_ASSET_EXISTS=0
|
BUILD_ASSET_EXISTS=0
|
||||||
for asset in $(jq '.assets.[].name' < "${THE_ACTION_WORKING_DIRECTORY}/release_info.json"); do
|
for asset in $(jq '.assets.[].name' < "${THE_ACTION_WORKING_DIRECTORY}/release_info.json" | tr -d '"'); do
|
||||||
if [[ "$asset" == "$BUILD_ASSET_NAME" ]]; then
|
if [[ "$asset" == "$BUILD_ASSET_NAME" ]]; then
|
||||||
BUILD_ASSET_EXISTS=1
|
BUILD_ASSET_EXISTS=1
|
||||||
break
|
break
|
||||||
|
@ -127,3 +128,58 @@ jobs:
|
||||||
-F "attachment=@${THE_ACTION_WORKING_DIRECTORY}/${BUILD_ASSET_NAME};type=application/zstd" > "${THE_ACTION_WORKING_DIRECTORY}/attach_${GITHUB_REF_NAME}.json" 2>/dev/null
|
-F "attachment=@${THE_ACTION_WORKING_DIRECTORY}/${BUILD_ASSET_NAME};type=application/zstd" > "${THE_ACTION_WORKING_DIRECTORY}/attach_${GITHUB_REF_NAME}.json" 2>/dev/null
|
||||||
popd >&/dev/null
|
popd >&/dev/null
|
||||||
fi
|
fi
|
||||||
|
push-build-x86_64_debian:
|
||||||
|
if: ${{ always() }}
|
||||||
|
needs: push-build-aarch64
|
||||||
|
concurrency:
|
||||||
|
group: push-build-group
|
||||||
|
runs-on: docker_debian_bookworm
|
||||||
|
env:
|
||||||
|
BUILD_ASSET_NAME: "break_interval_x86_64_debian_${{ github.ref_name }}.zstd"
|
||||||
|
steps:
|
||||||
|
- name: Update and upgrade with apt
|
||||||
|
run: apt-get --yes update && apt-get --yes upgrade
|
||||||
|
- name: Get necessary packages
|
||||||
|
run: apt-get --yes install gcc g++ jq curl cmake make zstd sed git
|
||||||
|
- name: Get release info
|
||||||
|
run: |
|
||||||
|
curl -X GET \
|
||||||
|
"https://git.seodisparate.com/api/v1/repos/stephenseo/break_interval/releases/tags/${GITHUB_REF_NAME}" \
|
||||||
|
-H 'accept: application/json' -o release_info.json
|
||||||
|
- name: Check if asset exists
|
||||||
|
run: |
|
||||||
|
for asset in $(jq '.assets[].name' < release_info.json | tr -d '"'); do
|
||||||
|
if [[ "$asset" == "$BUILD_ASSET_NAME" ]]; then
|
||||||
|
touch asset_exists
|
||||||
|
fi
|
||||||
|
done
|
||||||
|
- name: Build and publish if asset does not exist
|
||||||
|
run: |
|
||||||
|
if ! [[ -e ./asset_exists ]]; then
|
||||||
|
git clone --depth=1 --no-single-branch https://git.seodisparate.com/stephenseo/break_interval.git break_interval_clone
|
||||||
|
pushd break_interval_clone >&/dev/null
|
||||||
|
|
||||||
|
git checkout "${GITHUB_REF_NAME}"
|
||||||
|
cmake -S . -B buildRelease -DCMAKE_BUILD_TYPE=Release
|
||||||
|
make -C buildRelease
|
||||||
|
|
||||||
|
popd >&/dev/null
|
||||||
|
zstd --ultra -20 break_interval_clone/buildRelease/break_interval -o "${BUILD_ASSET_NAME}"
|
||||||
|
|
||||||
|
curl --fail-with-body -X PATCH \
|
||||||
|
"https://git.seodisparate.com/api/v1/repos/stephenseo/break_interval/releases/$(jq .id < release_info.json)" \
|
||||||
|
-H 'accept: application/json' \
|
||||||
|
-H "Authorization: token ${GITHUB_TOKEN}" \
|
||||||
|
-H 'Content-Type: application/json' \
|
||||||
|
-d "{
|
||||||
|
\"body\": \"$(jq .body < release_info.json | sed -e 's/^"//' -e 's/"$//')
|
||||||
|
SHA256SUM $(sha256sum "${BUILD_ASSET_NAME}")\"
|
||||||
|
}" >&/dev/null
|
||||||
|
|
||||||
|
curl --fail-with-body -X POST \
|
||||||
|
"https://git.seodisparate.com/api/v1/repos/stephenseo/break_interval/releases/$(jq .id < release_info.json)/assets" \
|
||||||
|
-H 'accept: application/json' \
|
||||||
|
-H "Authorization: token ${GITHUB_TOKEN}" \
|
||||||
|
-H 'Content-Type: multipart/form-data' \
|
||||||
|
-F "attachment=@${BUILD_ASSET_NAME};type=application/zstd" > attach.json 2>/dev/null
|
||||||
|
fi
|
||||||
|
|
|
@ -2,6 +2,12 @@
|
||||||
|
|
||||||
## Upcoming Changes
|
## Upcoming Changes
|
||||||
|
|
||||||
|
## Version 1.3.1
|
||||||
|
|
||||||
|
Updated action/workflow to build for Debain x86_64.
|
||||||
|
|
||||||
|
Minor fixes to action/workflow.
|
||||||
|
|
||||||
## Version 1.3
|
## Version 1.3
|
||||||
|
|
||||||
More tweaks to README.
|
More tweaks to README.
|
||||||
|
|
Loading…
Reference in a new issue