From fe958fc820c66eb5acce753287ffc581d2024bc8 Mon Sep 17 00:00:00 2001 From: Write Int <151211283+WriteNaN@users.noreply.github.com> Date: Wed, 3 Apr 2024 17:37:41 +0530 Subject: [PATCH] Update main.yml --- .github/workflows/main.yml | 47 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 47 insertions(+) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 8b13789..c8c503e 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -1 +1,48 @@ +name: Create Release +on: + pull_request: + branches: + - main + +jobs: + build: + name: Create Release + runs-on: ubuntu-latest + steps: + - name: Checkout code + uses: actions/checkout@v2 + + - name: Setup Bun + uses: oven-sh/setup-bun@v1 + + - name: Install Bun dependencies + run: bun install + + - name: Export project using Bun + run: bun export + + - name: Upload Release Asset + uses: actions/upload-release-asset@v1 + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + with: + upload_url: ${{ steps.create_release.outputs.upload_url }} + asset_path: ./dist.zip + asset_name: dist.zip + asset_content_type: application/zip + + - name: Create Release + id: create_release + uses: actions/create-release@v1 + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # This token is provided by Actions, you do not need to create your own token + with: + tag_name: ${{ github.ref }} + release_name: Release ${{ github.ref }} + body: | + Changes in this Release + - test + - test + draft: false + prerelease: false