From 2a18ee13236cd4e2702c1aa9d8113d8da361f624 Mon Sep 17 00:00:00 2001 From: Zephrynis Date: Sun, 13 Jul 2025 17:37:52 +0100 Subject: [PATCH] Add GitHub Actions workflow for release automation Introduces a workflow to automate release creation on pushes to the main branch. The workflow extracts the version from conf.yml, builds the project using blueprint-export, creates a GitHub release with installation instructions, and uploads the generated binary as a release asset. --- .github/workflows/export_ext.yml | 49 ++++++++++++++++++++++++++++++++ 1 file changed, 49 insertions(+) create mode 100644 .github/workflows/export_ext.yml diff --git a/.github/workflows/export_ext.yml b/.github/workflows/export_ext.yml new file mode 100644 index 0000000..3ff4858 --- /dev/null +++ b/.github/workflows/export_ext.yml @@ -0,0 +1,49 @@ +name: Create Release + +on: + push: + branches: + - main + +jobs: + release: + runs-on: ubuntu-latest + permissions: + contents: write + steps: + - name: Checkout code + uses: actions/checkout@v3 + + - name: Extract version from conf.yml + id: get_version + run: | + VERSION=$(sed -n 's/^[[:space:]]*version:[[:space:]]*//p' conf.yml | head -n 1) + VERSION=${VERSION//\"/} + VERSION=${VERSION//\'/} + echo "Detected version: $VERSION" + echo "::set-output name=VERSION::$VERSION" + + - name: Blueprint Build + id: blueprint_build + uses: zephrynis/blueprint-export@v1.0.0 + + - name: Create Release + id: create_release + uses: comnoco/create-release-action@main + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # This token is provided by Actions, you do not need to create your own token + with: + tag_name: ${{ steps.get_version.outputs.VERSION }} + release_name: v${{ steps.get_version.outputs.VERSION }} + body: "${{ github.event.head_commit.message }}\n\n# Steps to install\n1. Drop pteromonaco.blueprint into your pterodactyl root folder (This is usually /var/www/pterodactyl/)\n2. Run `blueprint -i pteromonaco` in the terminal" + draft: false + prerelease: false + + - name: Upload binaries to release + uses: svenstaro/upload-release-action@v2 + with: + repo_token: ${{ secrets.GITHUB_TOKEN }} + file: ${{ steps.blueprint_build.outputs.FILE }} + asset_name: ${{ steps.blueprint_build.outputs.FILE }} + tag: ${{ steps.get_version.outputs.VERSION }} + overwrite: true \ No newline at end of file