From 595be0633696bb0fcf7cf6ffeeda71381bcd6e3f Mon Sep 17 00:00:00 2001 From: Souldbminer <162390887+souldbminersmwc@users.noreply.github.com> Date: Mon, 6 Oct 2025 19:09:30 -0400 Subject: [PATCH 01/10] Create create_release --- .github/workflows/create_release | 54 ++++++++++++++++++++++++++++++++ 1 file changed, 54 insertions(+) create mode 100644 .github/workflows/create_release diff --git a/.github/workflows/create_release b/.github/workflows/create_release new file mode 100644 index 00000000..2bc469ad --- /dev/null +++ b/.github/workflows/create_release @@ -0,0 +1,54 @@ +name: Release + +on: + push: + tags: + - 'v*.*.*' # Trigger on tags like v1.2.3 + +jobs: + release: + runs-on: ubuntu-latest + + steps: + - name: Checkout repository + uses: actions/checkout@v3 + + - name: Install zip + run: sudo apt-get install -y zip + + - name: Create dist zip + run: | + mkdir -p release + zip -r release/dist.zip dist + + - name: Create GitHub release + id: create_release + uses: actions/create-release@v1 + with: + tag_name: ${{ github.ref_name }} + release_name: Release ${{ github.ref_name }} + generate_release_notes: true + draft: false + prerelease: false + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + + - name: Upload hoc.kip + uses: actions/upload-release-asset@v1 + with: + upload_url: ${{ steps.create_release.outputs.upload_url }} + asset_path: dist/atmosphere/hoc.kip + asset_name: hoc.kip + asset_content_type: application/octet-stream + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + + - name: Upload dist.zip + uses: actions/upload-release-asset@v1 + with: + upload_url: ${{ steps.create_release.outputs.upload_url }} + asset_path: release/dist.zip + asset_name: dist.zip + asset_content_type: application/zip + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} From 15d8c7b5e134b8d9efdf154c2a46e6d51145ae9e Mon Sep 17 00:00:00 2001 From: Souldbminer <162390887+souldbminersmwc@users.noreply.github.com> Date: Mon, 6 Oct 2025 19:09:49 -0400 Subject: [PATCH 02/10] Rename create_release to create_release.yml --- .github/workflows/{create_release => create_release.yml} | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename .github/workflows/{create_release => create_release.yml} (100%) diff --git a/.github/workflows/create_release b/.github/workflows/create_release.yml similarity index 100% rename from .github/workflows/create_release rename to .github/workflows/create_release.yml From b17793995a00296ab72e423ddb7600e1ae5e108a Mon Sep 17 00:00:00 2001 From: Souldbminer <162390887+souldbminersmwc@users.noreply.github.com> Date: Mon, 6 Oct 2025 19:10:45 -0400 Subject: [PATCH 03/10] Update create_release.yml --- .github/workflows/create_release.yml | 30 ++++++++++++++++++++++------ 1 file changed, 24 insertions(+), 6 deletions(-) diff --git a/.github/workflows/create_release.yml b/.github/workflows/create_release.yml index 2bc469ad..ace28342 100644 --- a/.github/workflows/create_release.yml +++ b/.github/workflows/create_release.yml @@ -2,8 +2,8 @@ name: Release on: push: - tags: - - 'v*.*.*' # Trigger on tags like v1.2.3 + branches: + - main # Run on every commit to main jobs: release: @@ -21,12 +21,30 @@ jobs: mkdir -p release zip -r release/dist.zip dist - - name: Create GitHub release + - name: Get latest release tag + id: get_latest_tag + run: | + LATEST_TAG=$(gh release list --limit 1 --json tagName -q '.[0].tagName' || echo "") + echo "LATEST_TAG=$LATEST_TAG" >> $GITHUB_ENV + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + + - name: Determine release tag + id: tag + run: | + if [ -z "${{ env.LATEST_TAG }}" ]; then + TAG="v0.1.0" + else + TAG="${{ env.LATEST_TAG }}" + fi + echo "RELEASE_TAG=$TAG" >> $GITHUB_ENV + + - name: Create or update GitHub release id: create_release - uses: actions/create-release@v1 + uses: ncipollo/release-action@v1 with: - tag_name: ${{ github.ref_name }} - release_name: Release ${{ github.ref_name }} + tag: ${{ env.RELEASE_TAG }} + name: Release ${{ env.RELEASE_TAG }} generate_release_notes: true draft: false prerelease: false From 704555c5defbf5604f6a919c8807c3dddccd0539 Mon Sep 17 00:00:00 2001 From: Souldbminer <162390887+souldbminersmwc@users.noreply.github.com> Date: Mon, 6 Oct 2025 19:11:14 -0400 Subject: [PATCH 04/10] Update create_release.yml --- .github/workflows/create_release.yml | 39 ++++++++++++---------------- 1 file changed, 16 insertions(+), 23 deletions(-) diff --git a/.github/workflows/create_release.yml b/.github/workflows/create_release.yml index ace28342..8a645768 100644 --- a/.github/workflows/create_release.yml +++ b/.github/workflows/create_release.yml @@ -13,8 +13,10 @@ jobs: - name: Checkout repository uses: actions/checkout@v3 - - name: Install zip - run: sudo apt-get install -y zip + - name: Install dependencies + run: | + sudo apt-get update + sudo apt-get install -y zip gh - name: Create dist zip run: | @@ -26,8 +28,6 @@ jobs: run: | LATEST_TAG=$(gh release list --limit 1 --json tagName -q '.[0].tagName' || echo "") echo "LATEST_TAG=$LATEST_TAG" >> $GITHUB_ENV - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - name: Determine release tag id: tag @@ -41,32 +41,25 @@ jobs: - name: Create or update GitHub release id: create_release - uses: ncipollo/release-action@v1 - with: - tag: ${{ env.RELEASE_TAG }} - name: Release ${{ env.RELEASE_TAG }} - generate_release_notes: true - draft: false - prerelease: false + run: | + if gh release view "$RELEASE_TAG" &>/dev/null; then + echo "Release exists, updating..." + gh release edit "$RELEASE_TAG" --generate-notes + else + echo "Creating new release..." + gh release create "$RELEASE_TAG" --generate-notes + fi env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - name: Upload hoc.kip - uses: actions/upload-release-asset@v1 - with: - upload_url: ${{ steps.create_release.outputs.upload_url }} - asset_path: dist/atmosphere/hoc.kip - asset_name: hoc.kip - asset_content_type: application/octet-stream + run: | + gh release upload "$RELEASE_TAG" dist/atmosphere/hoc.kip --clobber env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - name: Upload dist.zip - uses: actions/upload-release-asset@v1 - with: - upload_url: ${{ steps.create_release.outputs.upload_url }} - asset_path: release/dist.zip - asset_name: dist.zip - asset_content_type: application/zip + run: | + gh release upload "$RELEASE_TAG" release/dist.zip --clobber env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} From dec1c0e248f44fe24916515256cf047a10c3fa51 Mon Sep 17 00:00:00 2001 From: Souldbminer <162390887+souldbminersmwc@users.noreply.github.com> Date: Mon, 6 Oct 2025 19:12:46 -0400 Subject: [PATCH 05/10] Update create_release.yml --- .github/workflows/create_release.yml | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/.github/workflows/create_release.yml b/.github/workflows/create_release.yml index 8a645768..da94baa6 100644 --- a/.github/workflows/create_release.yml +++ b/.github/workflows/create_release.yml @@ -3,7 +3,7 @@ name: Release on: push: branches: - - main # Run on every commit to main + - main # Trigger on every commit jobs: release: @@ -40,10 +40,9 @@ jobs: echo "RELEASE_TAG=$TAG" >> $GITHUB_ENV - name: Create or update GitHub release - id: create_release run: | if gh release view "$RELEASE_TAG" &>/dev/null; then - echo "Release exists, updating..." + echo "Release exists, updating notes..." gh release edit "$RELEASE_TAG" --generate-notes else echo "Creating new release..." From 6fa8488f76c207afe4a3af95b045a89eab6aa910 Mon Sep 17 00:00:00 2001 From: Souldbminer <162390887+souldbminersmwc@users.noreply.github.com> Date: Mon, 6 Oct 2025 19:13:33 -0400 Subject: [PATCH 06/10] Delete .github/workflows/deploy_pages.yml --- .github/workflows/deploy_pages.yml | 42 ------------------------------ 1 file changed, 42 deletions(-) delete mode 100644 .github/workflows/deploy_pages.yml diff --git a/.github/workflows/deploy_pages.yml b/.github/workflows/deploy_pages.yml deleted file mode 100644 index 54e3bfc8..00000000 --- a/.github/workflows/deploy_pages.yml +++ /dev/null @@ -1,42 +0,0 @@ -# Simple workflow for deploying static content to GitHub Pages -name: Deploy static content to Pages - -on: - # Runs on pushes targeting the default branch - push: - branches: ["master"] - - # Allows you to run this workflow manually from the Actions tab - workflow_dispatch: - -# Sets permissions of the GITHUB_TOKEN to allow deployment to GitHub Pages -permissions: - contents: read - pages: write - id-token: write - -# Allow one concurrent deployment -concurrency: - group: "pages" - cancel-in-progress: true - -jobs: - # Single deploy job since we're just deploying - deploy: - environment: - name: github-pages - url: ${{ steps.deployment.outputs.page_url }} - runs-on: ubuntu-latest - steps: - - name: Checkout - uses: actions/checkout@v3 - - name: Setup Pages - uses: actions/configure-pages@v2 - - name: Upload artifact - uses: actions/upload-pages-artifact@v1 - with: - # Upload entire repository - path: './pages/dist' - - name: Deploy to GitHub Pages - id: deployment - uses: actions/deploy-pages@v1 From a7979f69a03995408e729a4657016f81dca52542 Mon Sep 17 00:00:00 2001 From: Souldbminer <162390887+souldbminersmwc@users.noreply.github.com> Date: Mon, 6 Oct 2025 19:13:39 -0400 Subject: [PATCH 07/10] Delete .github/workflows/create_release.yml --- .github/workflows/create_release.yml | 64 ---------------------------- 1 file changed, 64 deletions(-) delete mode 100644 .github/workflows/create_release.yml diff --git a/.github/workflows/create_release.yml b/.github/workflows/create_release.yml deleted file mode 100644 index da94baa6..00000000 --- a/.github/workflows/create_release.yml +++ /dev/null @@ -1,64 +0,0 @@ -name: Release - -on: - push: - branches: - - main # Trigger on every commit - -jobs: - release: - runs-on: ubuntu-latest - - steps: - - name: Checkout repository - uses: actions/checkout@v3 - - - name: Install dependencies - run: | - sudo apt-get update - sudo apt-get install -y zip gh - - - name: Create dist zip - run: | - mkdir -p release - zip -r release/dist.zip dist - - - name: Get latest release tag - id: get_latest_tag - run: | - LATEST_TAG=$(gh release list --limit 1 --json tagName -q '.[0].tagName' || echo "") - echo "LATEST_TAG=$LATEST_TAG" >> $GITHUB_ENV - - - name: Determine release tag - id: tag - run: | - if [ -z "${{ env.LATEST_TAG }}" ]; then - TAG="v0.1.0" - else - TAG="${{ env.LATEST_TAG }}" - fi - echo "RELEASE_TAG=$TAG" >> $GITHUB_ENV - - - name: Create or update GitHub release - run: | - if gh release view "$RELEASE_TAG" &>/dev/null; then - echo "Release exists, updating notes..." - gh release edit "$RELEASE_TAG" --generate-notes - else - echo "Creating new release..." - gh release create "$RELEASE_TAG" --generate-notes - fi - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - - - name: Upload hoc.kip - run: | - gh release upload "$RELEASE_TAG" dist/atmosphere/hoc.kip --clobber - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - - - name: Upload dist.zip - run: | - gh release upload "$RELEASE_TAG" release/dist.zip --clobber - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} From c01307e7a078c9ab3b19baeac82ffe4bbf8f6ce7 Mon Sep 17 00:00:00 2001 From: Souldbminer <162390887+souldbminersmwc@users.noreply.github.com> Date: Mon, 6 Oct 2025 19:14:05 -0400 Subject: [PATCH 08/10] Create main.yml --- .github/workflows/main.yml | 95 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 95 insertions(+) create mode 100644 .github/workflows/main.yml diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml new file mode 100644 index 00000000..fdd0f763 --- /dev/null +++ b/.github/workflows/main.yml @@ -0,0 +1,95 @@ +name: Release and Deploy + +on: + push: + branches: + - main # Adjust if your default branch is master + workflow_dispatch: + +permissions: + contents: read + pages: write + id-token: write + +concurrency: + group: "release-deploy" + cancel-in-progress: true + +jobs: + release: + runs-on: ubuntu-latest + steps: + - name: Checkout repository + uses: actions/checkout@v3 + + - name: Install dependencies + run: | + sudo apt-get update + sudo apt-get install -y zip gh + + - name: Create dist zip + run: | + mkdir -p release + zip -r release/dist.zip dist + + - name: Get latest release tag + id: get_latest_tag + run: | + LATEST_TAG=$(gh release list --limit 1 --json tagName -q '.[0].tagName' || echo "") + echo "LATEST_TAG=$LATEST_TAG" >> $GITHUB_ENV + + - name: Determine release tag + id: tag + run: | + if [ -z "${{ env.LATEST_TAG }}" ]; then + TAG="v0.1.0" + else + TAG="${{ env.LATEST_TAG }}" + fi + echo "RELEASE_TAG=$TAG" >> $GITHUB_ENV + + - name: Create or update GitHub release + run: | + if gh release view "$RELEASE_TAG" &>/dev/null; then + echo "Release exists, updating notes..." + gh release edit "$RELEASE_TAG" --generate-notes + else + echo "Creating new release..." + gh release create "$RELEASE_TAG" --generate-notes + fi + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + + - name: Upload hoc.kip + run: | + gh release upload "$RELEASE_TAG" dist/atmosphere/hoc.kip --clobber + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + + - name: Upload dist.zip + run: | + gh release upload "$RELEASE_TAG" release/dist.zip --clobber + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + + deploy: + runs-on: ubuntu-latest + needs: release + environment: + name: github-pages + url: ${{ steps.deployment.outputs.page_url }} + steps: + - name: Checkout + uses: actions/checkout@v3 + + - name: Setup Pages + uses: actions/configure-pages@v2 + + - name: Upload artifact + uses: actions/upload-pages-artifact@v1 + with: + path: './pages/dist' + + - name: Deploy to GitHub Pages + id: deployment + uses: actions/deploy-pages@v1 From f50f57255ecc9516b57ca4de850905939733e5be Mon Sep 17 00:00:00 2001 From: Souldbminer <162390887+souldbminersmwc@users.noreply.github.com> Date: Mon, 6 Oct 2025 19:15:40 -0400 Subject: [PATCH 09/10] Update main.yml --- .github/workflows/main.yml | 27 ++++++++++++++------------- 1 file changed, 14 insertions(+), 13 deletions(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index fdd0f763..9105d9fa 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -3,7 +3,7 @@ name: Release and Deploy on: push: branches: - - main # Adjust if your default branch is master + - main workflow_dispatch: permissions: @@ -39,36 +39,31 @@ jobs: echo "LATEST_TAG=$LATEST_TAG" >> $GITHUB_ENV - name: Determine release tag - id: tag run: | if [ -z "${{ env.LATEST_TAG }}" ]; then - TAG="v0.1.0" + echo "RELEASE_TAG=v0.1.0" >> $GITHUB_ENV else - TAG="${{ env.LATEST_TAG }}" + echo "RELEASE_TAG=${{ env.LATEST_TAG }}" >> $GITHUB_ENV fi - echo "RELEASE_TAG=$TAG" >> $GITHUB_ENV - name: Create or update GitHub release run: | + gh auth setup-git if gh release view "$RELEASE_TAG" &>/dev/null; then - echo "Release exists, updating notes..." gh release edit "$RELEASE_TAG" --generate-notes else - echo "Creating new release..." gh release create "$RELEASE_TAG" --generate-notes fi env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - name: Upload hoc.kip - run: | - gh release upload "$RELEASE_TAG" dist/atmosphere/hoc.kip --clobber + run: gh release upload "$RELEASE_TAG" dist/atmosphere/hoc.kip --clobber env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - name: Upload dist.zip - run: | - gh release upload "$RELEASE_TAG" release/dist.zip --clobber + run: gh release upload "$RELEASE_TAG" release/dist.zip --clobber env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} @@ -77,14 +72,20 @@ jobs: needs: release environment: name: github-pages - url: ${{ steps.deployment.outputs.page_url }} steps: - - name: Checkout + - name: Checkout repository uses: actions/checkout@v3 - name: Setup Pages uses: actions/configure-pages@v2 + - name: Ensure dist exists + run: | + if [ ! -d "./pages/dist" ]; then + echo "Error: ./pages/dist does not exist" + exit 1 + fi + - name: Upload artifact uses: actions/upload-pages-artifact@v1 with: From afdbb3635ce81d0de9a97ffae1aa41be507e21d7 Mon Sep 17 00:00:00 2001 From: Souldbminer <162390887+souldbminersmwc@users.noreply.github.com> Date: Mon, 6 Oct 2025 19:16:14 -0400 Subject: [PATCH 10/10] Update main.yml --- .github/workflows/main.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 9105d9fa..58993048 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -4,7 +4,6 @@ on: push: branches: - main - workflow_dispatch: permissions: contents: read