Compare commits
1 Commits
v0.0.1-dev
...
v0.0.1-dev
| Author | SHA1 | Date | |
|---|---|---|---|
| c5e2854f27 |
@@ -28,6 +28,13 @@ jobs:
|
|||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v4
|
- uses: actions/checkout@v4
|
||||||
|
|
||||||
|
- uses: ./declare
|
||||||
|
with:
|
||||||
|
configure_runner_environment: false
|
||||||
|
filename: ./src/release/tests/assets/release.yaml
|
||||||
|
|
||||||
|
- run: set -u; echo "$RELEASE_PROJECT_CURRENT_VERSION"
|
||||||
|
|
||||||
# skip login locally
|
# skip login locally
|
||||||
- if: github.repository == 'actions/release'
|
- if: github.repository == 'actions/release'
|
||||||
uses: https://gitea.puzzleyou.net/actions/configure-runner-environment@master
|
uses: https://gitea.puzzleyou.net/actions/configure-runner-environment@master
|
||||||
@@ -35,9 +42,6 @@ jobs:
|
|||||||
- uses: ./release
|
- uses: ./release
|
||||||
with:
|
with:
|
||||||
dry_run: true
|
dry_run: true
|
||||||
configure_runner_environment: false
|
|
||||||
|
|
||||||
- run: set -u; echo "$RELEASE_PROJECT_CURRENT_VERSION"
|
|
||||||
|
|
||||||
test-declare-directly:
|
test-declare-directly:
|
||||||
runs-on: action-runner
|
runs-on: action-runner
|
||||||
|
|||||||
@@ -46,7 +46,7 @@ runs:
|
|||||||
steps:
|
steps:
|
||||||
- name: add artefact
|
- name: add artefact
|
||||||
run: |
|
run: |
|
||||||
nix run ${{ github.action_path }} -- \
|
nix run . -- \
|
||||||
add-artefact \
|
add-artefact \
|
||||||
--state "${RELEASE_ACTION_STATEFILE}" \
|
--state "${RELEASE_ACTION_STATEFILE}" \
|
||||||
--artefact-type "${{ inputs.type }}" \
|
--artefact-type "${{ inputs.type }}" \
|
||||||
|
|||||||
@@ -38,7 +38,7 @@ runs:
|
|||||||
steps:
|
steps:
|
||||||
- name: add deployment
|
- name: add deployment
|
||||||
run: |
|
run: |
|
||||||
nix run ${{ github.action_path }} -- \
|
nix run . -- \
|
||||||
add-deployment \
|
add-deployment \
|
||||||
--state "${RELEASE_ACTION_STATEFILE}" \
|
--state "${RELEASE_ACTION_STATEFILE}" \
|
||||||
--deployment-type "${{ inputs.type }}" \
|
--deployment-type "${{ inputs.type }}" \
|
||||||
|
|||||||
@@ -104,11 +104,6 @@ runs:
|
|||||||
|
|
||||||
- name: init action state
|
- name: init action state
|
||||||
run: |
|
run: |
|
||||||
if [[ ! -z "${RELEASE_PROJECT_CURRENT_VERSION}" ]]; then
|
|
||||||
echo "already set up."
|
|
||||||
exit 0
|
|
||||||
fi
|
|
||||||
|
|
||||||
RELEASE_ACTION_STATEFILE=$(mktemp)
|
RELEASE_ACTION_STATEFILE=$(mktemp)
|
||||||
echo "[release] statefile: $RELEASE_ACTION_STATEFILE"
|
echo "[release] statefile: $RELEASE_ACTION_STATEFILE"
|
||||||
echo "RELEASE_ACTION_STATEFILE="$RELEASE_ACTION_STATEFILE"" \
|
echo "RELEASE_ACTION_STATEFILE="$RELEASE_ACTION_STATEFILE"" \
|
||||||
@@ -117,18 +112,13 @@ runs:
|
|||||||
- name: declare release project
|
- name: declare release project
|
||||||
if: inputs.version_descriptor == ''
|
if: inputs.version_descriptor == ''
|
||||||
run: |
|
run: |
|
||||||
if [[ ! -z "${RELEASE_PROJECT_CURRENT_VERSION}" ]]; then
|
|
||||||
echo "already set up."
|
|
||||||
exit 0
|
|
||||||
fi
|
|
||||||
|
|
||||||
if [[ "${{ github.ref_name }}" == "master" || "${{ github.ref_name }}" == "main" ]]; then
|
if [[ "${{ github.ref_name }}" == "master" || "${{ github.ref_name }}" == "main" ]]; then
|
||||||
IS_PRE_RELEASE="0"
|
IS_PRE_RELEASE="0"
|
||||||
else
|
else
|
||||||
IS_PRE_RELEASE="1"
|
IS_PRE_RELEASE="1"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
nix run ${{ github.action_path }} -- \
|
nix run . -- \
|
||||||
declare \
|
declare \
|
||||||
--state "${RELEASE_ACTION_STATEFILE}" \
|
--state "${RELEASE_ACTION_STATEFILE}" \
|
||||||
--release-yaml-filename "${{ inputs.filename }}" \
|
--release-yaml-filename "${{ inputs.filename }}" \
|
||||||
@@ -139,7 +129,7 @@ runs:
|
|||||||
--release-commit-sha "${{ github.sha }}" \
|
--release-commit-sha "${{ github.sha }}" \
|
||||||
--is-pre-release "${IS_PRE_RELEASE}"
|
--is-pre-release "${IS_PRE_RELEASE}"
|
||||||
|
|
||||||
nix run ${{ github.action_path }} -- \
|
nix run . -- \
|
||||||
dump \
|
dump \
|
||||||
--state "${RELEASE_ACTION_STATEFILE}" \
|
--state "${RELEASE_ACTION_STATEFILE}" \
|
||||||
--write-env-vars-to-filename "$GITHUB_ENV"
|
--write-env-vars-to-filename "$GITHUB_ENV"
|
||||||
@@ -147,18 +137,13 @@ runs:
|
|||||||
- name: declare release project
|
- name: declare release project
|
||||||
if: inputs.version_descriptor != ''
|
if: inputs.version_descriptor != ''
|
||||||
run: |
|
run: |
|
||||||
if [[ ! -z "${RELEASE_PROJECT_CURRENT_VERSION}" ]]; then
|
|
||||||
echo "already set up."
|
|
||||||
exit 0
|
|
||||||
fi
|
|
||||||
|
|
||||||
if [[ "${{ github.ref_name }}" == "master" || "${{ github.ref_name }}" == "main" ]]; then
|
if [[ "${{ github.ref_name }}" == "master" || "${{ github.ref_name }}" == "main" ]]; then
|
||||||
IS_PRE_RELEASE="0"
|
IS_PRE_RELEASE="0"
|
||||||
else
|
else
|
||||||
IS_PRE_RELEASE="1"
|
IS_PRE_RELEASE="1"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
nix run ${{ github.action_path }} -- \
|
nix run . -- \
|
||||||
declare \
|
declare \
|
||||||
--state "${RELEASE_ACTION_STATEFILE}" \
|
--state "${RELEASE_ACTION_STATEFILE}" \
|
||||||
--version-descriptor "${{ inputs.version_descriptor }}" \
|
--version-descriptor "${{ inputs.version_descriptor }}" \
|
||||||
@@ -170,7 +155,7 @@ runs:
|
|||||||
--is-pre-release "${IS_PRE_RELEASE}" \
|
--is-pre-release "${IS_PRE_RELEASE}" \
|
||||||
|
|
||||||
if [[ ! -z "${{ inputs.artefact_type }}" ]]; then
|
if [[ ! -z "${{ inputs.artefact_type }}" ]]; then
|
||||||
nix run ${{ github.action_path }} -- \
|
nix run . -- \
|
||||||
add-artefact \
|
add-artefact \
|
||||||
--state "${RELEASE_ACTION_STATEFILE}" \
|
--state "${RELEASE_ACTION_STATEFILE}" \
|
||||||
--artefact-type "${{ inputs.artefact_type }}" \
|
--artefact-type "${{ inputs.artefact_type }}" \
|
||||||
@@ -184,7 +169,7 @@ runs:
|
|||||||
fi
|
fi
|
||||||
|
|
||||||
if [[ ! -z "${{ inputs.deployment_type }}" ]]; then
|
if [[ ! -z "${{ inputs.deployment_type }}" ]]; then
|
||||||
nix run ${{ github.action_path }} -- \
|
nix run . -- \
|
||||||
add-deployment \
|
add-deployment \
|
||||||
--state "${RELEASE_ACTION_STATEFILE}" \
|
--state "${RELEASE_ACTION_STATEFILE}" \
|
||||||
--deployment-type "${{ inputs.deployment_type }}" \
|
--deployment-type "${{ inputs.deployment_type }}" \
|
||||||
@@ -195,7 +180,7 @@ runs:
|
|||||||
--deployment-repository "${{ inputs.deployment_repository }}"
|
--deployment-repository "${{ inputs.deployment_repository }}"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
nix run ${{ github.action_path }} -- \
|
nix run . -- \
|
||||||
dump \
|
dump \
|
||||||
--state "${RELEASE_ACTION_STATEFILE}" \
|
--state "${RELEASE_ACTION_STATEFILE}" \
|
||||||
--write-env-vars-to-filename "$GITHUB_ENV"
|
--write-env-vars-to-filename "$GITHUB_ENV"
|
||||||
|
|||||||
@@ -6,6 +6,6 @@ runs:
|
|||||||
steps:
|
steps:
|
||||||
- name: dump project description
|
- name: dump project description
|
||||||
run: |
|
run: |
|
||||||
nix run ${{ github.action_path }} -- \
|
nix run . -- \
|
||||||
dump \
|
dump \
|
||||||
--state "${RELEASE_ACTION_STATEFILE}"
|
--state "${RELEASE_ACTION_STATEFILE}"
|
||||||
|
|||||||
@@ -7,35 +7,26 @@ inputs:
|
|||||||
description: "do not change external state"
|
description: "do not change external state"
|
||||||
default: false
|
default: false
|
||||||
|
|
||||||
configure_runner_environment:
|
|
||||||
required: false
|
|
||||||
default: true
|
|
||||||
|
|
||||||
runs:
|
runs:
|
||||||
using: composite
|
using: composite
|
||||||
steps:
|
steps:
|
||||||
- name: declare project if neccessary
|
|
||||||
uses: ./declare
|
|
||||||
with:
|
|
||||||
configure_runner_environment: ${{ inputs.configure_runner_environment }}
|
|
||||||
|
|
||||||
- name: publish artefacts
|
- name: publish artefacts
|
||||||
run: |
|
run: |
|
||||||
nix run ${{ github.action_path }} -- \
|
nix run . -- \
|
||||||
publish-artefacts \
|
publish-artefacts \
|
||||||
--state "${RELEASE_ACTION_STATEFILE}" \
|
--state "${RELEASE_ACTION_STATEFILE}" \
|
||||||
--dry-run "${{ inputs.dry_run }}"
|
--dry-run "${{ inputs.dry_run }}"
|
||||||
|
|
||||||
- name: update deployments
|
- name: update deployments
|
||||||
run: |
|
run: |
|
||||||
nix run ${{ github.action_path }} -- \
|
nix run . -- \
|
||||||
update-deployments \
|
update-deployments \
|
||||||
--state "${RELEASE_ACTION_STATEFILE}" \
|
--state "${RELEASE_ACTION_STATEFILE}" \
|
||||||
--dry-run "${{ inputs.dry_run }}"
|
--dry-run "${{ inputs.dry_run }}"
|
||||||
|
|
||||||
- name: create release
|
- name: create release
|
||||||
run: |
|
run: |
|
||||||
nix run ${{ github.action_path }} -- \
|
nix run . -- \
|
||||||
create-release \
|
create-release \
|
||||||
--state "${RELEASE_ACTION_STATEFILE}" \
|
--state "${RELEASE_ACTION_STATEFILE}" \
|
||||||
--dry-run "${{ inputs.dry_run }}"
|
--dry-run "${{ inputs.dry_run }}"
|
||||||
|
|||||||
@@ -63,7 +63,7 @@ def publish_tarball(info: TarballReleaseInfo, cli: Cli):
|
|||||||
cli('curl',
|
cli('curl',
|
||||||
'--netrc',
|
'--netrc',
|
||||||
'--fail-with-body',
|
'--fail-with-body',
|
||||||
'--upload-file', info.filename,
|
'--upload-file %s' % info.filename,
|
||||||
'-i',
|
'-i',
|
||||||
'-X', 'PUT',
|
'-X', 'PUT',
|
||||||
'%s/api/packages/puzzleYOU/generic/%s/%s/%s' % ( # TODO owner
|
'%s/api/packages/puzzleYOU/generic/%s/%s/%s' % ( # TODO owner
|
||||||
|
|||||||
Reference in New Issue
Block a user