diff --git a/.github/workflows/release-tag.yml b/.github/workflows/release-tag.yml index 34ee9c58..e624cd2d 100644 --- a/.github/workflows/release-tag.yml +++ b/.github/workflows/release-tag.yml @@ -4,6 +4,16 @@ on: push: tags: - "*" + workflow_dispatch: + inputs: + uploadDiskOnly: + description: | + If enabled, will only re-build and re-upload the release disk, without + creating a new release. Uses the version of PlayOS defined in + application.nix, without verifying that it matches the git tag. + type: boolean + default: false + permissions: contents: write @@ -27,11 +37,18 @@ jobs: - uses: ./.github/actions/prep-build-env + - name: Get version from application.nix + run: | + PLAYOS_VERSION="$(nix eval --raw -f application.nix 'version')" + + echo "PLAYOS_VERSION=$PLAYOS_VERSION" >> $GITHUB_ENV + + - name: Validate tag + if: ${{ inputs.uploadDiskOnly != true }} run: | - app_vsn="$(nix eval --raw -f application.nix 'version')" - if [ "$app_vsn" != "$GITHUB_REF_NAME" ]; then - echo "Git tag ($GITHUB_REF_NAME) does not match version in application.nix ($app_vsn), aborting!" + if [ "$PLAYOS_VERSION" != "$GITHUB_REF_NAME" ]; then + echo "Git tag ($GITHUB_REF_NAME) does not match version in application.nix ($PLAYOS_VERSION), aborting!" exit 1 fi @@ -46,23 +63,25 @@ jobs: aws-region: eu-central-1 - name: Publish to S3 - run: ./.github/workflows/upload-test-disk.sh "$GITHUB_REF_NAME" + run: ./.github/workflows/upload-test-disk.sh "$PLAYOS_VERSION" - name: Create Release summary - run: ./.github/workflows/gen-release-summary.sh "$GITHUB_REF_NAME" > ./release-notes.md + if: ${{ inputs.uploadDiskOnly != true }} + run: ./.github/workflows/gen-release-summary.sh "$PLAYOS_VERSION" > ./release-notes.md - name: Create Release + if: ${{ inputs.uploadDiskOnly != true }} env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} run: | extra_args="" - if [[ "$GITHUB_REF_NAME" == *VALIDATION ]]; then + if [[ "$PLAYOS_VERSION" == *VALIDATION ]]; then extra_args="--prerelease" - elif [[ "$GITHUB_REF_NAME" == *TEST ]]; then + elif [[ "$PLAYOS_VERSION" == *TEST ]]; then extra_args="--draft" fi gh release create --verify-tag \ -F ./release-notes.md \ $extra_args \ - "$GITHUB_REF_NAME" + "$PLAYOS_VERSION" diff --git a/testing/disk/release.nix b/testing/disk/release.nix index 3ccf7534..608f4fe4 100644 --- a/testing/disk/release.nix +++ b/testing/disk/release.nix @@ -16,7 +16,7 @@ let partSizes = { boot = 525; # 525 MiB (matches install-playos default) system = 1024 * 9; # 9 GiB (install-playos default - 1GiB) - data = 400; # 400 MiB (same as testing/disk/default.nix) + data = 2000; # 2000 MiB (same as testing/disk/default.nix) }; diskSizeMiB = 8 + partSizes."boot" + partSizes."data" + (partSizes."system" * 2) + 1; in diff --git a/testing/release-validation.nix b/testing/release-validation.nix index 3716373c..11e563f6 100644 --- a/testing/release-validation.nix +++ b/testing/release-validation.nix @@ -67,7 +67,7 @@ in }, # PlayOS version we are updating into. - # Only used in the stub update server, not set in the bundle, etc. + # Used in the stub update server and set in the bundle. nextSystemVersion ? "9999.99.99", # PlayOS bundle for the next update