added release
This commit is contained in:
@@ -34,7 +34,6 @@ jobs:
|
|||||||
|
|
||||||
- name: Build binary
|
- name: Build binary
|
||||||
env:
|
env:
|
||||||
# This is the magic fix for 'act' and Docker-in-Docker
|
|
||||||
CROSS_CONTAINER_IN_CONTAINER: true
|
CROSS_CONTAINER_IN_CONTAINER: true
|
||||||
run: |
|
run: |
|
||||||
if [ "${{ matrix.use-cross }}" == "true" ]; then
|
if [ "${{ matrix.use-cross }}" == "true" ]; then
|
||||||
@@ -43,8 +42,38 @@ jobs:
|
|||||||
cargo build --release --target ${{ matrix.target }}
|
cargo build --release --target ${{ matrix.target }}
|
||||||
fi
|
fi
|
||||||
|
|
||||||
- name: Upload artifacts
|
# Prepare binary for upload
|
||||||
|
mkdir -p staging
|
||||||
|
cp target/${{ matrix.target }}/release/escape_room_server staging/escape_room_server-${{ matrix.target }}
|
||||||
|
|
||||||
|
- name: Upload artifacts (Internal)
|
||||||
uses: actions/upload-artifact@v4
|
uses: actions/upload-artifact@v4
|
||||||
with:
|
with:
|
||||||
name: escape-room-server-${{ matrix.target }}
|
name: binary-${{ matrix.target }}
|
||||||
path: target/${{ matrix.target }}/release/escape_room_server
|
path: staging/escape_room_server-${{ matrix.target }}
|
||||||
|
|
||||||
|
release:
|
||||||
|
name: Gitea Release
|
||||||
|
needs: build
|
||||||
|
# CRITICAL: This ensures the release job ONLY runs when you push a tag
|
||||||
|
if: startsWith(github.ref, 'refs/tags/')
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
|
||||||
|
steps:
|
||||||
|
- name: Download all artifacts
|
||||||
|
uses: actions/download-artifact@v4
|
||||||
|
with:
|
||||||
|
path: release-bins
|
||||||
|
pattern: binary-*
|
||||||
|
merge-multiple: true
|
||||||
|
|
||||||
|
- name: Create Gitea Release
|
||||||
|
# Using a Gitea-compatible release action
|
||||||
|
uses: https://github.com/softprops/action-gh-release@v2
|
||||||
|
with:
|
||||||
|
# Gitea uses the same 'GITHUB_TOKEN' secret name by default
|
||||||
|
token: ${{ secrets.GITHUB_TOKEN }}
|
||||||
|
files: release-bins/*
|
||||||
|
draft: false
|
||||||
|
prerelease: false
|
||||||
|
generate_release_notes: true
|
||||||
|
|||||||
Reference in New Issue
Block a user