Repository navigation
74 lines (69 loc) · 2.3 KB
/
Copy pathprepare-release.yml
File metadata and controls
74 lines (69 loc) · 2.3 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
name: Prepare and merge release
run-name: Release v${{ inputs.version }}
on:
workflow_dispatch:
inputs:
version:
description: "New version X.Y.Z; merges after full CI, then publishes via the tag workflow"
required: true
type: string
permissions:
contents: read
concurrency:
group: prepare-release
cancel-in-progress: false
jobs:
prepare:
if: github.ref == 'refs/heads/main'
runs-on: ubuntu-latest
timeout-minutes: 10
outputs:
pr: ${{ steps.prepare.outputs.pr }}
head: ${{ steps.prepare.outputs.head }}
steps:
- uses: actions/checkout@v6
with:
ref: ${{ github.sha }}
fetch-depth: 0
persist-credentials: false
- uses: ruby/setup-ruby@v1
with:
ruby-version: "3.4.10"
bundler-cache: true
- name: Prepare release PR
id: prepare
env:
GH_TOKEN: ${{ secrets.RELEASE_BOT_TOKEN }}
OPENAI_API_KEY: ${{ secrets.OPENAI_API_KEY }}
OPENAI_RELEASE_MODEL: ${{ vars.OPENAI_RELEASE_MODEL || secrets.OPENAI_RELEASE_MODEL }}
RELEASE_VERSION: ${{ inputs.version }}
run: |
test -n "$GH_TOKEN" || { echo 'Configure RELEASE_BOT_TOKEN'; exit 1; }
test -n "$OPENAI_API_KEY" || { echo 'Configure OPENAI_API_KEY'; exit 1; }
test -n "$OPENAI_RELEASE_MODEL" || { echo 'Configure OPENAI_RELEASE_MODEL in Actions Variables or Secrets'; exit 1; }
gh auth setup-git
bundle exec fastlane android release_prepare
finalize:
needs: prepare
runs-on: ubuntu-latest
timeout-minutes: 70
steps:
- uses: actions/checkout@v6
with:
ref: ${{ github.sha }}
fetch-depth: 0
persist-credentials: false
- uses: ruby/setup-ruby@v1
with:
ruby-version: "3.4.10"
bundler-cache: true
- name: Require full CI, merge, and tag
env:
GH_TOKEN: ${{ secrets.RELEASE_BOT_TOKEN }}
RELEASE_VERSION: ${{ inputs.version }}
RELEASE_PR: ${{ needs.prepare.outputs.pr }}
RELEASE_HEAD: ${{ needs.prepare.outputs.head }}
run: |
test -n "$GH_TOKEN" || { echo 'Configure RELEASE_BOT_TOKEN'; exit 1; }
gh auth setup-git
bundle exec fastlane android release_finish