Skip to content

Commit

Permalink
feat: disable schedule release
Browse files Browse the repository at this point in the history
  • Loading branch information
davidzwa committed Oct 15, 2023
1 parent c8ee3da commit 6bf6984
Show file tree
Hide file tree
Showing 2 changed files with 41 additions and 23 deletions.
55 changes: 32 additions & 23 deletions .github/workflows/build.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -72,31 +72,40 @@ jobs:
echo "tag=$VERSION" >> $GITHUB_OUTPUT
echo "image=$IMAGE" >> $GITHUB_OUTPUT
- name: Show size and version info
run: |
echo "Tag ${{steps.copy.outputs.tag}}"
echo "Version ${{steps.copy.outputs.version}}"
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.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
9 changes: 9 additions & 0 deletions .github/workflows/release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -73,9 +73,18 @@ jobs:
echo "tag=$VERSION" >> $GITHUB_OUTPUT
echo "image=$IMAGE" >> $GITHUB_OUTPUT
- name: Show size and version info
run: |
echo "Tag ${{steps.copy.outputs.tag}}"
echo "Version ${{steps.copy.outputs.version}}"
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
Expand Down

0 comments on commit 6bf6984

Please sign in to comment.