Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
35 changes: 27 additions & 8 deletions .github/workflows/release-tag.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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

Expand All @@ -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"
2 changes: 1 addition & 1 deletion testing/disk/release.nix
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion testing/release-validation.nix
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down