~cytrogen/evi-run

ref: 0a538df3d09185427872e44bf81bded93517f818 evi-run/.github/workflows/release.yml -rw-r--r-- 3.4 KiB
0a538df3 — Bendy Initial commit 6 months ago
                                                                                
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
name: Release

on:
  push:
    tags:
      - 'v*'

jobs:
  create-release:
    runs-on: ubuntu-latest
    permissions:
      contents: write

    steps:
    - name: Checkout code
      uses: actions/checkout@v4
      with:
        fetch-depth: 0

    - name: Generate changelog
      id: changelog
      run: |
        # Get the latest two tags
        CURRENT_TAG=${GITHUB_REF#refs/tags/}
        PREVIOUS_TAG=$(git describe --tags --abbrev=0 HEAD^ 2>/dev/null || echo "")
        
        echo "current_tag=$CURRENT_TAG" >> $GITHUB_OUTPUT
        
        # Generate changelog
        if [ -n "$PREVIOUS_TAG" ]; then
          echo "## What's Changed" > CHANGELOG.tmp
          git log --pretty=format:"* %s (%h)" $PREVIOUS_TAG..$CURRENT_TAG >> CHANGELOG.tmp
        else
          echo "## What's Changed" > CHANGELOG.tmp
          echo "* Initial release" >> CHANGELOG.tmp
        fi
        
        # Read changelog into output
        {
          echo 'CHANGELOG<<EOF'
          cat CHANGELOG.tmp
          echo 'EOF'
        } >> $GITHUB_OUTPUT

    - name: Create Release
      uses: softprops/action-gh-release@v1
      env:
        GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
      with:
        tag_name: ${{ steps.changelog.outputs.current_tag }}
        name: evi.run ${{ steps.changelog.outputs.current_tag }}
        body: |
          🚀 **evi.run Release ${{ steps.changelog.outputs.current_tag }}**
          
          ${{ steps.changelog.outputs.CHANGELOG }}
          
          ## 📦 Installation
          
          ```bash
          # Quick install with Docker
          git clone https://github.com/${{ github.repository }}.git
          cd evi-run
          cp .env.example .env
          # Edit .env with your credentials
          chmod +x docker_setup_en.sh
          ./docker_setup_en.sh
          docker compose up --build -d
          ```
          
          ## 🔗 Useful Links
          - 📚 [Documentation](https://github.com/${{ github.repository }}/blob/main/README.md)
          - 🤝 [Contributing](https://github.com/${{ github.repository }}/blob/main/CONTRIBUTING.md)
          - 💬 [Support](https://t.me/playa3000)
          
          **Full Changelog**: https://github.com/${{ github.repository }}/compare/${{ steps.changelog.outputs.previous_tag }}...${{ steps.changelog.outputs.current_tag }}
        draft: false
        prerelease: false

  docker-release:
    needs: create-release
    runs-on: ubuntu-latest
    permissions:
      contents: read
      packages: write

    steps:
    - name: Checkout repository
      uses: actions/checkout@v4

    - name: Log in to Container Registry
      uses: docker/login-action@v3
      with:
        registry: ghcr.io
        username: ${{ github.actor }}
        password: ${{ secrets.GITHUB_TOKEN }}

    - name: Extract version from tag
      id: version
      run: echo "version=${GITHUB_REF#refs/tags/v}" >> $GITHUB_OUTPUT

    - name: Build and push release image
      uses: docker/build-push-action@v5
      with:
        context: .
        push: true
        tags: |
          ghcr.io/${{ github.repository }}:latest
          ghcr.io/${{ github.repository }}:${{ steps.version.outputs.version }}
        labels: |
          org.opencontainers.image.title=evi.run
          org.opencontainers.image.description=Customizable Multi-Agent AI System
          org.opencontainers.image.version=${{ steps.version.outputs.version }}
          org.opencontainers.image.source=https://github.com/${{ github.repository }}