From 79b09cb1ab47df51a3da1e00360d5c87f303ac4f Mon Sep 17 00:00:00 2001 From: Zan <62830223+Zan1456@users.noreply.github.com> Date: Mon, 17 Mar 2025 20:49:50 +0100 Subject: [PATCH] =?UTF-8?q?Automatikus=20buildel=C3=A9s?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/build.yml | 56 +++++++++++++++++++++++++++++++++++++ 1 file changed, 56 insertions(+) create mode 100644 .github/workflows/build.yml diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml new file mode 100644 index 0000000..fa1460d --- /dev/null +++ b/.github/workflows/build.yml @@ -0,0 +1,56 @@ +name: Package and Release Extension + +on: + push: + branches: + - main + +jobs: + build-and-release: + runs-on: ubuntu-latest + steps: + - name: Checkout code + uses: actions/checkout@v3 + with: + fetch-depth: 0 + + - name: Get current date + id: date + run: echo "::set-output name=date::$(date +'%Y-%m-%d-%H-%M')" + + - name: Create ZIP file + run: | + zip -r "firxa-${{ steps.date.outputs.date }}.zip" . -x "*.git*" "*.github*" + + - name: Delete previous pre-release + uses: dev-drprasad/delete-tag-and-release@v0.2.1 + with: + delete_release: true + tag_name: pre-release + env: + GITHUB_TOKEN: ${{ secrets.GH_TOKEN }} + continue-on-error: true + + - name: Create new pre-release + id: create_release + uses: actions/create-release@v1 + env: + GITHUB_TOKEN: ${{ secrets.GH_TOKEN }} + with: + tag_name: pre-release + release_name: Fejlesztői build + body: | + A build automatikusan készült ${{ steps.date.outputs.date }}-án/én. + Ez egy kiadás előtti build, amely minden egyes, a commitelés után frissül. + draft: false + prerelease: true + + - name: Upload ZIP to release + uses: actions/upload-release-asset@v1 + env: + GITHUB_TOKEN: ${{ secrets.GH_TOKEN }} + with: + upload_url: ${{ steps.create_release.outputs.upload_url }} + asset_path: ./firxa-${{ steps.date.outputs.date }}.zip + asset_name: firxa-${{ steps.date.outputs.date }}.zip + asset_content_type: application/zip \ No newline at end of file