Compare commits

...

13 commits
1.3 ... main

Author SHA1 Message Date
1620d03671 Fix debian build file extension (zst not zstd)
All checks were successful
Build for Releases / ensure-release-exists (push) Successful in 1s
Build for Releases / push-build-x86_64 (push) Successful in 6s
Build for Releases / push-build-aarch64 (push) Successful in 25s
Build for Releases / push-build-x86_64_debian (push) Successful in 24s
Build for Releases / push-build-aarch64_debian (push) Successful in 1m37s
2024-06-23 12:23:15 +09:00
c3776dfdd7 Update Changelog.md
All checks were successful
Build for Releases / ensure-release-exists (push) Successful in 2s
Build for Releases / push-build-x86_64 (push) Successful in 5s
Build for Releases / push-build-aarch64 (push) Successful in 25s
Build for Releases / push-build-x86_64_debian (push) Successful in 24s
Build for Releases / push-build-aarch64_debian (push) Successful in 1m39s
2024-06-23 12:16:40 +09:00
adce9ba9bc Fix action/workflow for building and releasing 2024-06-23 12:16:06 +09:00
a575fbda37 Add aarch64 debian build for action/workflow
All checks were successful
Build for Releases / ensure-release-exists (push) Successful in 2s
Build for Releases / push-build-x86_64 (push) Successful in 6s
Build for Releases / push-build-aarch64 (push) Successful in 26s
Build for Releases / push-build-x86_64_debian (push) Successful in 25s
Build for Releases / push-build-aarch64_debian (push) Successful in 1m53s
Also minor fixes.
2024-06-23 12:09:06 +09:00
2232155b9c Update Changelog.md, fix typo 2024-06-22 13:44:51 +00:00
23830523e9 Update Changelog.md
All checks were successful
Build for Releases / ensure-release-exists (push) Successful in 0s
Build for Releases / push-build-x86_64 (push) Successful in 5s
Build for Releases / push-build-aarch64 (push) Successful in 27s
Build for Releases / push-build-x86_64_debian (push) Successful in 25s
2024-06-22 22:37:24 +09:00
43a287b307 Fixes to action/workflow
All checks were successful
Build for Releases / ensure-release-exists (push) Successful in 0s
Build for Releases / push-build-x86_64 (push) Successful in 6s
Build for Releases / push-build-aarch64 (push) Successful in 27s
Build for Releases / push-build-x86_64_debian (push) Successful in 24s
2024-06-22 22:34:24 +09:00
3471e70c66 Fixes to workflow for debian build
Some checks failed
Build for Releases / ensure-release-exists (push) Successful in 0s
Build for Releases / push-build-x86_64 (push) Successful in 7s
Build for Releases / push-build-aarch64 (push) Successful in 25s
Build for Releases / push-build-x86_64_debian (push) Failing after 19s
2024-06-22 22:09:39 +09:00
26e3dea58c Update action/workflow to build for x86_64 debian
Some checks failed
Build for Releases / ensure-release-exists (push) Successful in 1s
Build for Releases / push-build-x86_64 (push) Successful in 7s
Build for Releases / push-build-aarch64 (push) Successful in 26s
Build for Releases / push-build-x86_64_debian (push) Has been cancelled
2024-06-22 22:04:56 +09:00
44daec460b Update .forgejo/workflows/build_releases.yaml
Ensure build and push asset jobs do not run at the same time.
2024-06-22 04:40:43 +00:00
084573165c Update workflow/action
All checks were successful
Build for Releases / ensure-release-exists (push) Successful in 2s
Build for Releases / push-build-x86_64 (push) Successful in 4s
Build for Releases / push-build-aarch64 (push) Successful in 25s
2024-06-15 13:29:13 +09:00
2576f4b544 Update workflow/action, append SHA256 to release
All checks were successful
Build for Releases / ensure-release-exists (push) Successful in 2s
Build for Releases / ensure-releases-exists-and-push-build-x86_64 (push) Successful in 5s
Build for Releases / ensure-releases-exists-and-push-build-aarch64 (push) Successful in 25s
2024-06-15 13:01:33 +09:00
5d4194d068 Update workflow/action 2024-06-15 11:13:53 +09:00
2 changed files with 162 additions and 8 deletions

View file

@ -22,13 +22,16 @@ jobs:
-H "Authorization: token ${GITHUB_TOKEN}" \
-H 'Content-Type: application/json' \
-d "{
\"body\": \" SHA256SUMS\",
\"name\": \"break_interval version ${GITHUB_REF_NAME}\",
\"tag_name\": \"${GITHUB_REF_NAME}\" }" 2>/dev/null > "${THE_ACTION_WORKING_DIRECTORY}/release_${GITHUB_REF_NAME}_create.json"
fi
ensure-releases-exists-and-push-build-x86_64:
push-build-x86_64:
needs: ensure-release-exists
runs-on: any_archLinux
concurrency:
group: push-build-group
runs-on: x86_64_archLinux
steps:
- name: Check release assets and build for x86_64
run: |
@ -38,7 +41,7 @@ jobs:
"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
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
BUILD_ASSET_EXISTS=1
break
@ -54,17 +57,32 @@ jobs:
make -C buildRelease
strip --strip-unneeded buildRelease/break_interval
zstd --ultra -20 buildRelease/break_interval -o "${THE_ACTION_WORKING_DIRECTORY}/${BUILD_ASSET_NAME}"
curl --fail-with-body -X GET \
"https://git.seodisparate.com/api/v1/repos/stephenseo/break_interval/releases/$(jq .id < "${THE_ACTION_WORKING_DIRECTORY}/release_info.json")" \
-H 'accept: application/json' -o "${THE_ACTION_WORKING_DIRECTORY}/current_release_info.json" 2>/dev/null
curl --fail-with-body -X PATCH \
"https://git.seodisparate.com/api/v1/repos/stephenseo/break_interval/releases/$(jq .id < "${THE_ACTION_WORKING_DIRECTORY}/release_info.json")" \
-H 'accept: application/json' \
-H "Authorization: token ${GITHUB_TOKEN}" \
-H 'Content-Type: application/json' \
-d "{
\"body\": \"$(jq .body < "${THE_ACTION_WORKING_DIRECTORY}/current_release_info.json" | sed -e 's/^"//' -e 's/"$//')
$(find "${THE_ACTION_WORKING_DIRECTORY}" -maxdepth 1 -name "*${BUILD_ASSET_NAME}" -execdir sha256sum '{}' ';')\"
}" >&/dev/null
curl --fail-with-body -X POST \
"https://git.seodisparate.com/api/v1/repos/stephenseo/break_interval/releases/$(jq .id < "${THE_ACTION_WORKING_DIRECTORY}/release_info.json")/assets" \
-H 'accept: application/json' \
-H "Authorization: token ${GITHUB_TOKEN}" \
-H 'Content-Type: multipart/form-data' \
-F "attachment=@${THE_ACTION_WORKING_DIRECTORY}/${BUILD_ASSET_NAME};type=application/zstd" > "${THE_ACTION_WORKING_DIRECTORY}/attach_${GITHUB_REF_NAME}.json"
-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
fi
ensure-releases-exists-and-push-build-aarch64:
needs: ensure-release-exists
push-build-aarch64:
if: ${{ always() }}
needs: push-build-x86_64
concurrency:
group: push-build-group
runs-on: aarch64_archLinux
steps:
- name: Check release assets and build for aarch64
@ -75,7 +93,7 @@ jobs:
"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
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
BUILD_ASSET_EXISTS=1
break
@ -91,11 +109,135 @@ jobs:
make -C buildRelease
strip --strip-unneeded buildRelease/break_interval
zstd --ultra -20 buildRelease/break_interval -o "${THE_ACTION_WORKING_DIRECTORY}/${BUILD_ASSET_NAME}"
curl --fail-with-body -X GET \
"https://git.seodisparate.com/api/v1/repos/stephenseo/break_interval/releases/$(jq .id < "${THE_ACTION_WORKING_DIRECTORY}/release_info.json")" \
-H 'accept: application/json' -o "${THE_ACTION_WORKING_DIRECTORY}/current_release_info.json" 2>/dev/null
curl --fail-with-body -X PATCH \
"https://git.seodisparate.com/api/v1/repos/stephenseo/break_interval/releases/$(jq .id < "${THE_ACTION_WORKING_DIRECTORY}/release_info.json")" \
-H 'accept: application/json' \
-H "Authorization: token ${GITHUB_TOKEN}" \
-H 'Content-Type: application/json' \
-d "{
\"body\": \"$(jq .body < "${THE_ACTION_WORKING_DIRECTORY}/current_release_info.json" | sed -e 's/^"//' -e 's/"$//')
$(find "${THE_ACTION_WORKING_DIRECTORY}" -maxdepth 1 -name "*${BUILD_ASSET_NAME}" -execdir sha256sum '{}' ';')\"
}" >&/dev/null
curl --fail-with-body -X POST \
"https://git.seodisparate.com/api/v1/repos/stephenseo/break_interval/releases/$(jq .id < "${THE_ACTION_WORKING_DIRECTORY}/release_info.json")/assets" \
-H 'accept: application/json' \
-H "Authorization: token ${GITHUB_TOKEN}" \
-H 'Content-Type: multipart/form-data' \
-F "attachment=@${THE_ACTION_WORKING_DIRECTORY}/${BUILD_ASSET_NAME};type=application/zstd" > "${THE_ACTION_WORKING_DIRECTORY}/attach_${GITHUB_REF_NAME}.json"
-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
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 }}.zst"
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
break
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 "${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
push-build-aarch64_debian:
if: ${{ always() }}
needs: push-build-x86_64_debian
concurrency:
group: push-build-group
runs-on: aarch64_docker_debian_bookworm
env:
BUILD_ASSET_NAME: "break_interval_aarch64_debian_${{ github.ref_name }}.zst"
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
break
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 "${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

View file

@ -2,6 +2,18 @@
## Upcoming Changes
## Version 1.3.2
Updated action/workflow to build for Debian aarch64.
Minor fixes to action/workflow.
## Version 1.3.1
Updated action/workflow to build for Debian x86_64.
Minor fixes to action/workflow.
## Version 1.3
More tweaks to README.