-
Notifications
You must be signed in to change notification settings - Fork 2
89 lines (79 loc) · 3.23 KB
/
release_proxy_libs.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
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
name: Release Proxy Libs
on:
workflow_dispatch:
inputs:
proxy_lib:
type: choice
description: 'Proxy lib name'
options:
- helioshttp
- heliosgrpc
- heliosmongo
- heliosgin
- heliosmux
- heliosecho
- helioschi
- heliosmacaron
- heliossarama
- helioslambda
- helioss3
- heliosdynamodb
- heliossqs
- helioseventbridge
- helioslogrus
- heliossqlx
- helioszerolog
- helioshttptest
- heliospg
required: true
proxy_lib_version:
description: 'Proxy lib version'
required: true
min_version_supported:
description: 'Original package last supported version'
required: true
jobs:
test:
uses: ./.github/workflows/test.yml
secrets:
ACTIONS_GITHUB_TOKEN: ${{ secrets.ACTIONS_GITHUB_TOKEN }}
tag:
runs-on: ubuntu-latest
needs: [test]
env:
GH_ACCESS_TOKEN: ${{ secrets.ACTIONS_GITHUB_TOKEN }}
steps:
- name: Checkout Repo
uses: actions/checkout@v3
- name: Get current proxy_libs_version.json
run: |
curl -X GET https://d1wp6iv35l684a.cloudfront.net/go-proxy-libs/proxy_libs_versions.json > ./proxy-libs/proxy_libs_versions.json
- name: Set up Python 3.11
uses: actions/setup-python@v2
with:
python-version: '3.11'
- name: Update proxy-libs version json
working-directory: proxy-libs
run: |
python3 version_helper.py ${{ github.event.inputs.proxy_lib }} ${{ github.event.inputs.proxy_lib_version }} ${{ github.event.inputs.min_version_supported }}
- name: Tag and push
run: |
git tag proxy-libs/${{ github.event.inputs.proxy_lib }}/${{ github.event.inputs.proxy_lib_version }} && git push origin proxy-libs/${{ github.event.inputs.proxy_lib }}/${{ github.event.inputs.proxy_lib_version }}
- name: Configure AWS credentials
uses: aws-actions/configure-aws-credentials@13d241b293754004c80624b5567555c4a39ffbe3
with:
aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID }}
aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
aws-region: us-east-1
- name: Upload updated proxy_libs_version.json to s3
run: |
aws s3 cp ./proxy-libs/proxy_libs_versions.json s3://www.heliosphere.io/go-proxy-libs/proxy_libs_versions.json
- name: Notify Slack
if: ${{ success() }}
uses: rtCamp/action-slack-notify@v2
env:
SLACK_WEBHOOK: ${{ secrets.SLACK_WEBHOOK }}
SLACK_USERNAME: heliosphere-ci-bot
SLACK_TITLE: A new version of ${{ github.event.inputs.proxy_lib }} proxy lib was successfully released!
SLACK_MESSAGE: Version ${{ github.event.inputs.proxy_lib_version }} of ${{ github.event.inputs.proxy_lib }} was released
SLACK_COLOR: ${{ job.status }}