Skip to content

Commit e9e28b1

Browse files
committed
ci: Update GitHub workflows for versioning and release management
- Add new GitHub workflows for versioning and releases - Update release workflow to trigger on all tags instead of just main branch pushes - Remove unnecessary jobs and dependencies from release workflow
1 parent 3ef3f06 commit e9e28b1

File tree

2 files changed

+28
-36
lines changed

2 files changed

+28
-36
lines changed

.github/workflows/release.yaml

Lines changed: 6 additions & 36 deletions
Original file line numberDiff line numberDiff line change
@@ -2,38 +2,21 @@ name: Release
22

33
on:
44
push:
5-
branches:
6-
- main
7-
paths-ignore:
8-
- 'docs/**'
9-
- '*.md'
10-
- LICENSE
11-
- '.github/**'
5+
tags:
6+
- '*'
127

138
permissions: write-all
149

15-
jobs:
16-
draft-release:
17-
runs-on: ubuntu-latest
18-
19-
outputs:
20-
tag_name: ${{ steps.drafter.outputs.tag_name }}
21-
22-
env:
23-
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
24-
25-
steps:
26-
- uses: release-drafter/release-drafter@v5
27-
id: drafter
10+
env:
11+
VERSION: ${{ github.ref }}
2812

13+
jobs:
2914
publish-package:
3015
runs-on: ubuntu-latest
31-
needs: draft-release
3216

3317
env:
3418
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
3519
TWINE_PASSWORD: ${{ secrets.PYPI_PASSWORD }}
36-
VERSION: ${{ needs.draft-release.outputs.tag_name }}
3720

3821
steps:
3922
- uses: actions/checkout@v4
@@ -44,15 +27,13 @@ jobs:
4427

4528
publish-image:
4629
runs-on: ubuntu-latest
47-
needs: draft-release
4830

4931
strategy:
5032
matrix:
5133
arch: [linux/amd64, linux/arm64]
5234

5335
env:
5436
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
55-
VERSION: ${{ needs.draft-release.outputs.tag_name }}
5637

5738
steps:
5839
- uses: actions/checkout@v4
@@ -62,15 +43,4 @@ jobs:
6243
- uses: docker/setup-buildx-action@v3
6344
- run: make publish-image
6445
env:
65-
DOCKER_DEFAULT_PLATFORM: ${{ matrix.arch }}
66-
67-
publish-release:
68-
runs-on: ubuntu-latest
69-
needs:
70-
- publish-package
71-
- publish-image
72-
73-
steps:
74-
- uses: release-drafter/release-drafter@v5
75-
with:
76-
publish: true
46+
DOCKER_DEFAULT_PLATFORM: ${{ matrix.arch }}

.github/workflows/version.yaml

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
name: Version
2+
3+
on:
4+
push:
5+
branches:
6+
- main
7+
paths-ignore:
8+
- 'docs/**'
9+
- '*.md'
10+
- LICENSE
11+
- '.github/**'
12+
13+
permissions: write-all
14+
15+
jobs:
16+
version:
17+
runs-on: ubuntu-latest
18+
19+
steps:
20+
- uses: release-drafter/release-drafter@v5
21+
with:
22+
publish: true

0 commit comments

Comments
 (0)