WIP
This commit is contained in:
76
release/action.yaml
Normal file
76
release/action.yaml
Normal file
@@ -0,0 +1,76 @@
|
||||
name: "release project"
|
||||
description: "publish artifacte, update deployments and create gitea release"
|
||||
|
||||
inputs:
|
||||
dry_run:
|
||||
required: false
|
||||
description: "do not change external state"
|
||||
default: false
|
||||
|
||||
configure_runner_environment:
|
||||
required: false
|
||||
default: true
|
||||
|
||||
build_run:
|
||||
required: false
|
||||
description: "commands to run before publishing artefacts"
|
||||
default: ""
|
||||
|
||||
sync_versions:
|
||||
required: false
|
||||
default: false
|
||||
|
||||
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: sync versions
|
||||
if: inputs.sync_versions == 'true'
|
||||
run: |
|
||||
nix run ${{ github.action_path }} -- \
|
||||
sync-versions \
|
||||
--state "${RELEASE_ACTION_STATEFILE}"
|
||||
|
||||
- name: run build commands
|
||||
if: inputs.build_run != ''
|
||||
run: ${{ inputs.build_run }}
|
||||
|
||||
- name: publish artefacts
|
||||
run: |
|
||||
nix run ${{ github.action_path }} -- \
|
||||
publish-artefacts \
|
||||
--state "${RELEASE_ACTION_STATEFILE}" \
|
||||
--dry-run "${{ inputs.dry_run }}"
|
||||
|
||||
- name: update deployments
|
||||
run: |
|
||||
nix run ${{ github.action_path }} -- \
|
||||
update-deployments \
|
||||
--state "${RELEASE_ACTION_STATEFILE}" \
|
||||
--dry-run "${{ inputs.dry_run }}"
|
||||
|
||||
- name: create release
|
||||
run: |
|
||||
nix run ${{ github.action_path }} -- \
|
||||
create-release \
|
||||
--state "${RELEASE_ACTION_STATEFILE}" \
|
||||
--dry-run "${{ inputs.dry_run }}"
|
||||
Reference in New Issue
Block a user