Implementierung v0
This commit is contained in:
44
check-is-not-released/action.yaml
Normal file
44
check-is-not-released/action.yaml
Normal file
@@ -0,0 +1,44 @@
|
||||
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
|
||||
|
||||
if [[ "$RELEASE_PROJECT_IS_RELEASED" = "1" ]]; then
|
||||
VERSION="$RELEASE_PROJECT_CURRENT_VERSION"
|
||||
echo "Project is already released with version ${VERSION}."
|
||||
echo "You should increment the project version."
|
||||
echo "If you don't, then the project will not be released."
|
||||
exit -1
|
||||
else
|
||||
echo "Project is not yet released."
|
||||
fi
|
||||
Reference in New Issue
Block a user