# Example consuming workflow. Drop this in a WoW interface repo (e.g. GlueXML) # at .gitea/workflows/release.yml. Pushing a tag like `v1.0.0` builds the MPQ # and attaches it to a matching Gitea release. # # Requires: Actions enabled on the repo, and a runner advertising `ubuntu-latest` # (or change runs-on to a label your act_runner registers). name: Release MPQ on: push: tags: - "v*" jobs: package: runs-on: ubuntu-latest steps: - name: Checkout uses: actions/checkout@v4 - name: Build patch MPQ id: pack uses: paste/mpq-packager@v1 with: manifest: mpq.yaml version: ${{ github.ref_name }} - name: Create release and upload asset env: TOKEN: ${{ secrets.GITHUB_TOKEN }} run: | set -euo pipefail API="${GITHUB_SERVER_URL}/api/v1/repos/${GITHUB_REPOSITORY}" TAG="${GITHUB_REF_NAME}" MPQ="${{ steps.pack.outputs.mpq-path }}" NAME="${{ steps.pack.outputs.mpq-name }}" echo "Creating release $TAG" RID=$(curl -fsSL -X POST "$API/releases" \ -H "Authorization: token $TOKEN" \ -H "Content-Type: application/json" \ -d "{\"tag_name\":\"$TAG\",\"name\":\"$TAG\",\"draft\":false,\"prerelease\":false}" \ | python3 -c 'import sys,json; print(json.load(sys.stdin)["id"])') echo "Uploading $NAME to release $RID" curl -fsSL -X POST "$API/releases/$RID/assets?name=$NAME" \ -H "Authorization: token $TOKEN" \ -H "Content-Type: application/octet-stream" \ --data-binary "@$MPQ" echo "Done."