-
Notifications
You must be signed in to change notification settings - Fork 88
53 lines (48 loc) · 1.46 KB
/
release.yaml
File metadata and controls
53 lines (48 loc) · 1.46 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
name: AutoFilm Release
on:
workflow_dispatch:
push:
branches:
- main
paths:
- app/version.py
jobs:
Get-Version:
runs-on: ubuntu-latest
outputs:
app_version: ${{ steps.version.outputs.app_version }}
steps:
- name: Clone Repository
uses: actions/checkout@v4
- name: APP Version
id: version
run: |
APP_VERSION=$(cat app/version.py | sed -ne 's/APP_VERSION\s=\s"v\(.*\)"/\1/gp')
echo "检测到版本号为 $APP_VERSION"
echo "app_version=$APP_VERSION" >> "$GITHUB_OUTPUT"
Release-Docker-Builder:
name: Build Docker Image
needs: [ Get-Version ]
uses: ./.github/workflows/docker-builder.yaml
with:
APP_VERSION: ${{ needs.Get-Version.outputs.app_version }}
IS_LATEST: true
secrets:
DOCKERHUB_USERNAME: ${{ secrets.DOCKERHUB_USERNAME }}
DOCKERHUB_TOKEN: ${{ secrets.DOCKERHUB_TOKEN }}
Create-Release:
permissions: write-all
runs-on: ubuntu-latest
needs: [ Get-Version, Release-Docker-Builder ]
steps:
- name: Create Release
id: create_release
uses: actions/create-release@latest
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
tag_name: v${{ needs.Get-Version.outputs.app_version }}
release_name: v${{ needs.Get-Version.outputs.app_version }}
body: ${{ github.event.commits[0].message }}
draft: false
prerelease: false