diff --git a/.github/workflows/build.yaml b/.github/workflows/build.yaml index 74410e7..128cc1e 100644 --- a/.github/workflows/build.yaml +++ b/.github/workflows/build.yaml @@ -64,39 +64,47 @@ jobs: run: | source repository/src/config NOW=$(date +"%Y-%m-%d") - VERSION=${DIST_VERSION}-${NOW}-nightly - IMAGE=monsterpi-$VERSION + TAG=${DIST_VERSION}-${NOW}-nightly + IMAGE=monsterpi-$TAG cp repository/src/workspace/*.img $IMAGE.img - echo "tag=$VERSION" >> $GITHUB_OUTPUT + echo "tag=$TAG" >> $GITHUB_OUTPUT echo "image=$IMAGE" >> $GITHUB_OUTPUT + - name: Show size and tag + run: | + echo "Tag ${{steps.copy.outputs.tag}}" + echo "File size of ${{ steps.copy.outputs.image }}.img" + stat --printf="%s" ${{ steps.copy.outputs.image }}.img + - name: Zip Image if: github.event_name == 'schedule' run: | zip ${{ steps.copy.outputs.image }}.zip ${{ steps.copy.outputs.image }}.img + echo "File size of ${{ steps.copy.outputs.image }}.zip" + stat --printf="%s" ${{ steps.copy.outputs.image }}.zip - - name: Create release - uses: actions/create-release@v1 - if: github.event_name == 'schedule' - id: create_release - with: - draft: ${{ github.ref_name == 'develop' }} - prerelease: ${{ contains(env.DIST_VERSION, 'rc') || contains(env.DIST_VERSION, 'unstable') }} - tag_name: ${{ steps.copy.outputs.version }} - release_name: MonsterPi ${{ steps.copy.outputs.image }} - body: "Release notes not added" # ${{ steps.build_changelog.outputs.changelog }} - env: - GITHUB_TOKEN: ${{ github.token }} - - - name: Upload server bundle zip - uses: actions/upload-release-asset@v1 - if: github.event_name == 'schedule' - env: - GITHUB_TOKEN: ${{ github.token }} - with: - upload_url: ${{ steps.create_release.outputs.upload_url }} - asset_path: ${{ steps.copy.outputs.image }}.zip - asset_name: ${{ steps.copy.outputs.image }}.zip - asset_content_type: application/zip +# - name: Create release +# uses: actions/create-release@v1 +# if: github.event_name == 'schedule' +# id: create_release +# with: +# draft: ${{ github.ref_name == 'develop' }} +# prerelease: ${{ contains(env.DIST_VERSION, 'rc') || contains(env.DIST_VERSION, 'unstable') }} +# tag_name: ${{ steps.copy.outputs.tag }} +# release_name: MonsterPi ${{ steps.copy.outputs.image }} +# body: "Release notes not added" # ${{ steps.build_changelog.outputs.changelog }} +# env: +# GITHUB_TOKEN: ${{ github.token }} +# +# - name: Upload server bundle zip +# uses: actions/upload-release-asset@v1 +# if: github.event_name == 'schedule' +# env: +# GITHUB_TOKEN: ${{ github.token }} +# with: +# upload_url: ${{ steps.create_release.outputs.upload_url }} +# asset_path: ${{ steps.copy.outputs.image }}.zip +# asset_name: ${{ steps.copy.outputs.image }}.zip +# asset_content_type: application/zip diff --git a/.github/workflows/release.yaml b/.github/workflows/release.yaml index 0a8ad7a..b61cb85 100644 --- a/.github/workflows/release.yaml +++ b/.github/workflows/release.yaml @@ -65,17 +65,25 @@ jobs: id: copy run: | source repository/src/config - VERSION=${DIST_VERSION} + TAG=${DIST_VERSION} IMAGE=monsterpi-$VERSION cp repository/src/workspace/*.img $IMAGE.img - echo "tag=$VERSION" >> $GITHUB_OUTPUT + echo "tag=$TAG" >> $GITHUB_OUTPUT echo "image=$IMAGE" >> $GITHUB_OUTPUT + - name: Show size and version info + run: | + echo "Tag ${{steps.copy.outputs.tag}}" + echo "File size of ${{ steps.copy.outputs.image }}.img" + stat --printf="%s" ${{ steps.copy.outputs.image }}.img + - name: Zip Image run: | zip ${{ steps.copy.outputs.image }}.zip ${{ steps.copy.outputs.image }}.img + echo "File size of ${{ steps.copy.outputs.image }}.zip" + stat --printf="%s" ${{ steps.copy.outputs.image }}.zip - name: Create release uses: actions/create-release@v1 @@ -83,7 +91,7 @@ jobs: with: draft: ${{ github.ref_name == 'develop' }} prerelease: ${{ contains(env.DIST_VERSION, 'rc') || contains(env.DIST_VERSION, 'unstable') }} - tag_name: ${{ steps.copy.outputs.version }} + tag_name: ${{ steps.copy.outputs.tag }} release_name: MonsterPi ${{ steps.copy.outputs.image }} body: "Release notes not added" # ${{ steps.build_changelog.outputs.changelog }} env: diff --git a/src/modules/monsterpi/filesystem/home/pi/scripts/welcome b/src/modules/monsterpi/filesystem/home/pi/scripts/welcome index bffbd70..e5b51af 100644 --- a/src/modules/monsterpi/filesystem/home/pi/scripts/welcome +++ b/src/modules/monsterpi/filesystem/home/pi/scripts/welcome @@ -2,7 +2,7 @@ _NAME=$(hostname) _IP=$(hostname -I) -_FDM_MONSTER_VERSION=$(jq -r .version ~/fdm-monster/server/package.json || echo "unknown") +_FDM_MONSTER_VERSION=$(jq -r .version ~/fdm-monster/dist-active/package.json || echo "unknown") _MONSTERPI_VERSION=$(cat /etc/monsterpi_version || echo "unknown") echo