forked from vllm-project/router
-
Notifications
You must be signed in to change notification settings - Fork 1
54 lines (46 loc) · 1.52 KB
/
release.yml
File metadata and controls
54 lines (46 loc) · 1.52 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
name: Release
on:
pull_request:
types: [closed]
branches: [main]
jobs:
tag-release:
if: github.event.pull_request.merged == true && startsWith(github.event.pull_request.head.ref, 'release/')
runs-on: ubuntu-latest
permissions:
contents: write
actions: write
steps:
- uses: actions/checkout@v4
with:
ref: ${{ github.event.pull_request.merge_commit_sha }}
fetch-depth: 0
- name: Extract version from branch name
id: version
env:
BRANCH: ${{ github.event.pull_request.head.ref }}
run: |
VERSION="${BRANCH#release/}"
VERSION="${VERSION#v}"
echo "tag=v${VERSION}" >> $GITHUB_OUTPUT
- name: Create and push tag
run: |
git tag "${{ steps.version.outputs.tag }}"
git push origin "${{ steps.version.outputs.tag }}"
- name: Create GitHub Release
run: |
gh release create "${{ steps.version.outputs.tag }}" \
--title "${{ steps.version.outputs.tag }}" \
--generate-notes
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Trigger wheel build
run: |
gh workflow run build-wheel.yml --ref "${{ steps.version.outputs.tag }}"
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Trigger Docker image build
run: |
gh workflow run build-push-image.yml --ref "${{ steps.version.outputs.tag }}"
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}