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