WIP
All checks were successful
run tests / check (push) Successful in 36s
run tests / release (push) Successful in 16s

This commit is contained in:
2025-12-05 21:05:59 +01:00
parent bd50bef4ad
commit 2eb510b13a
38 changed files with 2635 additions and 0 deletions

View File

@@ -0,0 +1,48 @@
name: "check not released"
description: "ensure that there is no release with the current version"
inputs:
configure_runner_environment:
required: false
default: true
runs:
using: composite
steps:
- if: inputs.configure_runner_environment == 'true'
uses: https://gitea.puzzleyou.net/actions/configure-runner-environment@master
- name: declare project if neccessary
run: |
if [[ ! -z "${RELEASE_PROJECT_CURRENT_VERSION}" ]]; then
echo "already set up."
exit 0
fi
nix run ${{ github.action_path }} -- \
declare \
--release-yaml-filename ".gitea/release.yaml" \
--gitea-instance "https://gitea.puzzleyou.net" \
--release-repository-name "${{ github.repository }}" \
--release-ref-name "${{ github.ref_name }}" \
--release-run-number "${{ github.run_number }}" \
--release-commit-sha "${{ github.sha }}" \
--write-env-vars-to-filename "$GITHUB_ENV"
- name: check release state
run: |
set +e
nix run ${{ github.action_path }} -- \
dump \
--state "${RELEASE_ACTION_STATEFILE}" \
| grep "is already released: True"
IS_RELEASED_EXIT_CODE=$?
if [[ "$IS_RELEASED_EXIT_CODE" -eq 0 ]]; then
VERSION="$RELEASE_PROJECT_CURRENT_VERSION"
echo "Project is already released with version ${VERSION}."
exit -1
else
echo "Project is not yet released."
fi