-
Notifications
You must be signed in to change notification settings - Fork 1
127 lines (104 loc) · 3.22 KB
/
Copy pathrelease.yml
File metadata and controls
127 lines (104 loc) · 3.22 KB
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
114
115
116
117
118
119
120
121
122
123
124
125
126
127
name: Release Pipeline
on:
push:
tags:
- 'v*' # Trigger on version tags
jobs:
# Deploy to PyPI
pypi:
name: Deploy to PyPI
runs-on: ubuntu-latest
environment: pypi
permissions:
id-token: write # IMPORTANT: this permission is mandatory for trusted publishing
steps:
- uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: '3.12'
- name: Install build tools
run: |
python -m pip install --upgrade pip
python -m pip install build
- name: Build package
run: python -m build
- name: Publish to PyPI
uses: pypa/gh-action-pypi-publish@release/v1
# Uses OIDC Trusted Publisher, no password needed!
# Deploy to Docker Hub
docker:
name: Deploy to Docker Hub
runs-on: ubuntu-latest
permissions:
contents: read
packages: write
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Set up QEMU
uses: docker/setup-qemu-action@v3
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Log in to Docker Hub
uses: docker/login-action@v3
with:
registry: docker.io
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
- name: Extract metadata
id: meta
uses: docker/metadata-action@v5
with:
images: docker.io/ivolnistov/youtrack-rocket-mcp
tags: |
type=semver,pattern={{version}}
type=semver,pattern={{major}}.{{minor}}
type=semver,pattern={{major}}
type=raw,value=latest
- name: Build and push Docker image
uses: docker/build-push-action@v5
with:
context: .
platforms: linux/amd64,linux/arm64
push: true
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
cache-from: type=gha
cache-to: type=gha,mode=max
# Create GitHub Release
release:
name: Create GitHub Release
needs: [pypi, docker] # Wait for both deployments
runs-on: ubuntu-latest
permissions:
contents: write
steps:
- uses: actions/checkout@v4
- name: Extract version from tag
id: version
run: echo "VERSION=${GITHUB_REF#refs/tags/v}" >> $GITHUB_OUTPUT
- name: Create Release
uses: softprops/action-gh-release@v1
with:
name: Release v${{ steps.version.outputs.VERSION }}
draft: false
prerelease: false
generate_release_notes: true
body: |
## 🚀 Release v${{ steps.version.outputs.VERSION }}
### Installation Options:
#### PyPI
```bash
# Using uvx (no installation required)
uvx youtrack-rocket-mcp
# Or install with uv tool
uv tool install youtrack-rocket-mcp
```
#### Docker Hub
```bash
docker pull ivolnistov/youtrack-rocket-mcp:${{ steps.version.outputs.VERSION }}
docker pull ivolnistov/youtrack-rocket-mcp:latest
```
### What's Changed
See the full changelog below.