-
Notifications
You must be signed in to change notification settings - Fork 7
65 lines (61 loc) · 1.99 KB
/
force-release.yml
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
name: Manual Release
on:
workflow_dispatch:
inputs:
release_token:
description: 'Your release token'
required: true
release_reason:
description: 'Short reason for this manual release'
required: true
jobs:
token-check:
runs-on: ubuntu-latest
steps:
- uses: actions/github-script@v3
with:
script: |
core.setFailed('token are not equivalent!')
if: github.event.inputs.release_token != env.release_token
env:
release_token: ${{ secrets.FASTAPI_SERVE_RELEASE_TOKEN }}
update-docker:
needs: token-check
runs-on: ubuntu-latest
steps:
- uses: benc-uk/workflow-dispatch@v1
with:
workflow: Manual Docker Build
token: ${{ secrets.JINA_DEV_BOT }}
inputs: '{ "release_token": "${{ env.release_token }}", "triggered_by": "TAG"}'
env:
release_token: ${{ secrets.FASTAPI_SERVE_RELEASE_TOKEN }}
regular-release:
needs: token-check
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
with:
token: ${{ secrets.JINA_DEV_BOT }}
fetch-depth: 100 # means max contribute history is limited to 100 lines
# submodules: true
- uses: actions/setup-python@v2
with:
python-version: 3.7
- run: |
git fetch --depth=1 origin +refs/tags/*:refs/tags/*
npm install git-release-notes
pip install twine wheel
./scripts/release.sh final "${{ github.event.inputs.release_reason }}" "${{github.actor}}"
env:
TWINE_USERNAME: ${{ secrets.TWINE_USERNAME }}
TWINE_PASSWORD: ${{ secrets.TWINE_PASSWORD }}
JINA_SLACK_WEBHOOK: ${{ secrets.JINA_SLACK_WEBHOOK }}
- if: failure()
run: echo "nothing to release"
- name: bumping master version
uses: ad-m/[email protected]
with:
github_token: ${{ secrets.JINA_DEV_BOT }}
tags: true
branch: main