44 push :
55 tags :
66 - " *"
7+ workflow_dispatch :
8+ inputs :
9+ uploadDiskOnly :
10+ description : |
11+ If enabled, will only re-build and re-upload the release disk, without
12+ creating a new release. Uses the version of PlayOS defined in
13+ application.nix, without verifying that it matches the git tag.
14+ type : boolean
15+ default : false
16+
717
818permissions :
919 contents : write
@@ -27,11 +37,18 @@ jobs:
2737
2838 - uses : ./.github/actions/prep-build-env
2939
40+ - name : Get version from application.nix
41+ run : |
42+ PLAYOS_VERSION="$(nix eval --raw -f application.nix 'version')"
43+
44+ echo "PLAYOS_VERSION=$PLAYOS_VERSION" >> $GITHUB_ENV
45+
46+
3047 - name : Validate tag
48+ if : ${{ inputs.uploadDiskOnly != true }}
3149 run : |
32- app_vsn="$(nix eval --raw -f application.nix 'version')"
33- if [ "$app_vsn" != "$GITHUB_REF_NAME" ]; then
34- echo "Git tag ($GITHUB_REF_NAME) does not match version in application.nix ($app_vsn), aborting!"
50+ if [ "$PLAYOS_VERSION" != "$GITHUB_REF_NAME" ]; then
51+ echo "Git tag ($GITHUB_REF_NAME) does not match version in application.nix ($PLAYOS_VERSION), aborting!"
3552 exit 1
3653 fi
3754
@@ -46,23 +63,25 @@ jobs:
4663 aws-region : eu-central-1
4764
4865 - name : Publish to S3
49- run : ./.github/workflows/upload-test-disk.sh "$GITHUB_REF_NAME "
66+ run : ./.github/workflows/upload-test-disk.sh "$PLAYOS_VERSION "
5067
5168 - name : Create Release summary
52- run : ./.github/workflows/gen-release-summary.sh "$GITHUB_REF_NAME" > ./release-notes.md
69+ if : ${{ inputs.uploadDiskOnly != true }}
70+ run : ./.github/workflows/gen-release-summary.sh "$PLAYOS_VERSION" > ./release-notes.md
5371
5472 - name : Create Release
73+ if : ${{ inputs.uploadDiskOnly != true }}
5574 env :
5675 GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
5776 run : |
5877 extra_args=""
59- if [[ "$GITHUB_REF_NAME " == *VALIDATION ]]; then
78+ if [[ "$PLAYOS_VERSION " == *VALIDATION ]]; then
6079 extra_args="--prerelease"
61- elif [[ "$GITHUB_REF_NAME " == *TEST ]]; then
80+ elif [[ "$PLAYOS_VERSION " == *TEST ]]; then
6281 extra_args="--draft"
6382 fi
6483
6584 gh release create --verify-tag \
6685 -F ./release-notes.md \
6786 $extra_args \
68- "$GITHUB_REF_NAME "
87+ "$PLAYOS_VERSION "
0 commit comments