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