|
1 | | -name: Semantic Release |
2 | | - |
3 | | -on: |
4 | | - push: |
5 | | - branches: |
6 | | - - main |
7 | | - |
8 | | -permissions: |
9 | | - contents: write |
10 | | - issues: write |
11 | | - pull-requests: write |
12 | | - |
13 | | -jobs: |
14 | | - test: |
15 | | - uses: ./.github/workflows/test.yml |
16 | | - |
17 | | - release: |
18 | | - name: Release |
19 | | - needs: test |
20 | | - runs-on: ubuntu-latest |
21 | | - environment: |
22 | | - name: melio-s3 |
23 | | - url: https://aitools.eilat.melioservices.com/mcpm/servers.json |
24 | | - |
25 | | - steps: |
26 | | - - name: Checkout |
27 | | - uses: actions/checkout@v4 |
28 | | - with: |
29 | | - fetch-depth: 0 |
30 | | - persist-credentials: false |
31 | | - |
32 | | - - name: Generate token |
33 | | - id: generate_token |
34 | | - uses: tibdex/github-app-token@v2 |
35 | | - with: |
36 | | - app_id: ${{ secrets.BOT_APP_ID }} |
37 | | - private_key: ${{ secrets.BOT_PRIVATE_KEY }} |
38 | | - |
39 | | - - name: Install pnpm |
40 | | - uses: pnpm/action-setup@v4 |
41 | | - with: |
42 | | - version: 8 |
43 | | - run_install: false |
44 | | - |
45 | | - - name: Setup Node.js |
46 | | - uses: actions/setup-node@v4 |
47 | | - with: |
48 | | - node-version: 'lts/*' |
49 | | - cache: 'pnpm' |
50 | | - |
51 | | - - name: Install dependencies |
52 | | - run: pnpm install |
53 | | - |
54 | | - - name: Semantic Release |
55 | | - id: semantic |
56 | | - uses: cycjimmy/semantic-release-action@v4 |
57 | | - env: |
58 | | - GITHUB_TOKEN: ${{ steps.generate_token.outputs.token }} |
59 | | - |
60 | | - - name: Install uv with caching |
61 | | - if: steps.semantic.outputs.new_release_published == 'true' |
62 | | - uses: astral-sh/setup-uv@v5 |
63 | | - with: |
64 | | - enable-cache: true |
65 | | - cache-dependency-glob: "pyproject.toml" |
66 | | - |
67 | | - - name: Run preparation script |
68 | | - if: steps.semantic.outputs.new_release_published == 'true' |
69 | | - env: |
70 | | - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |
71 | | - run: | |
72 | | - chmod +x ./scripts/prepare.sh |
73 | | - source .venv/bin/activate |
74 | | - ./scripts/prepare.sh ./output |
75 | | -
|
76 | | - - name: Configure AWS credentials |
77 | | - if: steps.semantic.outputs.new_release_published == 'true' |
78 | | - uses: aws-actions/configure-aws-credentials@v4 |
79 | | - with: |
80 | | - aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID }} |
81 | | - aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }} |
82 | | - aws-region: us-east-1 |
83 | | - |
84 | | - - name: Upload servers.json to S3 |
85 | | - if: steps.semantic.outputs.new_release_published == 'true' |
86 | | - run: | |
87 | | - aws s3 cp ./output/api/servers.json s3://aitools.eilat.melioservices.com/mcpm/servers.json --content-type "application/json" |
88 | | -
|
89 | | - - name: Invalidate CloudFront cache |
90 | | - if: steps.semantic.outputs.new_release_published == 'true' |
91 | | - run: | |
92 | | - aws cloudfront create-invalidation --distribution-id E3VSH7IG39WRB6 --paths "/mcpm/servers.json" |
| 1 | +# DISABLED: Moved to CircleCI |
| 2 | +# name: Semantic Release |
| 3 | +# |
| 4 | +# on: |
| 5 | +# push: |
| 6 | +# branches: |
| 7 | +# - main |
| 8 | +# |
| 9 | +# permissions: |
| 10 | +# contents: write |
| 11 | +# issues: write |
| 12 | +# pull-requests: write |
| 13 | +# |
| 14 | +# jobs: |
| 15 | +# test: |
| 16 | +# uses: ./.github/workflows/test.yml |
| 17 | +# |
| 18 | +# release: |
| 19 | +# name: Release |
| 20 | +# needs: test |
| 21 | +# runs-on: ubuntu-latest |
| 22 | +# environment: |
| 23 | +# name: melio-s3 |
| 24 | +# url: https://aitools.eilat.melioservices.com/mcpm/servers.json |
| 25 | +# |
| 26 | +# steps: |
| 27 | +# - name: Checkout |
| 28 | +# uses: actions/checkout@v4 |
| 29 | +# with: |
| 30 | +# fetch-depth: 0 |
| 31 | +# persist-credentials: false |
| 32 | +# |
| 33 | +# - name: Generate token |
| 34 | +# id: generate_token |
| 35 | +# uses: tibdex/github-app-token@v2 |
| 36 | +# with: |
| 37 | +# app_id: ${{ secrets.BOT_APP_ID }} |
| 38 | +# private_key: ${{ secrets.BOT_PRIVATE_KEY }} |
| 39 | +# |
| 40 | +# - name: Install pnpm |
| 41 | +# uses: pnpm/action-setup@v4 |
| 42 | +# with: |
| 43 | +# version: 8 |
| 44 | +# run_install: false |
| 45 | +# |
| 46 | +# - name: Setup Node.js |
| 47 | +# uses: actions/setup-node@v4 |
| 48 | +# with: |
| 49 | +# node-version: 'lts/*' |
| 50 | +# cache: 'pnpm' |
| 51 | +# |
| 52 | +# - name: Install dependencies |
| 53 | +# run: pnpm install |
| 54 | +# |
| 55 | +# - name: Semantic Release |
| 56 | +# id: semantic |
| 57 | +# uses: cycjimmy/semantic-release-action@v4 |
| 58 | +# env: |
| 59 | +# GITHUB_TOKEN: ${{ steps.generate_token.outputs.token }} |
| 60 | +# |
| 61 | +# - name: Install uv with caching |
| 62 | +# if: steps.semantic.outputs.new_release_published == 'true' |
| 63 | +# uses: astral-sh/setup-uv@v5 |
| 64 | +# with: |
| 65 | +# enable-cache: true |
| 66 | +# cache-dependency-glob: "pyproject.toml" |
| 67 | +# |
| 68 | +# - name: Run preparation script |
| 69 | +# if: steps.semantic.outputs.new_release_published == 'true' |
| 70 | +# env: |
| 71 | +# GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |
| 72 | +# run: | |
| 73 | +# chmod +x ./scripts/prepare.sh |
| 74 | +# source .venv/bin/activate |
| 75 | +# ./scripts/prepare.sh ./output |
| 76 | +# |
| 77 | +# - name: Configure AWS credentials |
| 78 | +# if: steps.semantic.outputs.new_release_published == 'true' |
| 79 | +# uses: aws-actions/configure-aws-credentials@v4 |
| 80 | +# with: |
| 81 | +# aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID }} |
| 82 | +# aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }} |
| 83 | +# aws-region: us-east-1 |
| 84 | +# |
| 85 | +# - name: Upload servers.json to S3 |
| 86 | +# if: steps.semantic.outputs.new_release_published == 'true' |
| 87 | +# run: | |
| 88 | +# aws s3 cp ./output/api/servers.json s3://aitools.eilat.melioservices.com/mcpm/servers.json --content-type "application/json" |
| 89 | +# |
| 90 | +# - name: Invalidate CloudFront cache |
| 91 | +# if: steps.semantic.outputs.new_release_published == 'true' |
| 92 | +# run: | |
| 93 | +# aws cloudfront create-invalidation --distribution-id E3VSH7IG39WRB6 --paths "/mcpm/servers.json" |
0 commit comments