File tree Expand file tree Collapse file tree 2 files changed +57
-22
lines changed Expand file tree Collapse file tree 2 files changed +57
-22
lines changed Original file line number Diff line number Diff line change 1+ name : Build and Test
2+
3+ on :
4+ push :
5+ branches :
6+ - master
7+ schedule :
8+ - cron : " 0 13 * * 1"
9+ workflow_dispatch :
10+ workflow_call :
11+
12+ jobs :
13+ build-and-test :
14+ name : Build and Test
15+ runs-on : ubuntu-latest
16+ environment : chris-1xrn.wbx.ai
17+ steps :
18+ - uses : actions/checkout@v4
19+ with :
20+ fetch-depth : 0
21+ fetch-tags : true
22+ - name : Install Dependencies
23+ run : pip install -r requirements.txt
24+ - name : Get Webex Token
25+ id : webex_token
26+ run : |
27+ WEBEX_TEAMS_ACCESS_TOKEN=$(curl -s ${{ secrets.WEBEX_TOKEN_KEEPER_URL }} | jq -r .access_token)
28+ echo "WEBEX_TEAMS_ACCESS_TOKEN=$WEBEX_TEAMS_ACCESS_TOKEN" >> "$GITHUB_OUTPUT"
29+ echo "::add-mask::$WEBEX_TEAMS_ACCESS_TOKEN"
30+ - name : Build and Test
31+ run : script/ci
32+ env :
33+ WEBEX_TEAMS_ACCESS_TOKEN : ${{ steps.webex_token.outputs.WEBEX_TEAMS_ACCESS_TOKEN }}
34+ WEBEX_TEAMS_TEST_DOMAIN : ${{ vars.WEBEX_TEAMS_TEST_DOMAIN }}
35+ WEBEX_TEAMS_TEST_ID_START : ${{ vars.WEBEX_TEAMS_TEST_ID_START }}
36+ WEBEX_TEAMS_TEST_FILE_URL : ${{ vars.WEBEX_TEAMS_TEST_FILE_URL }}
37+ WEBEX_TEAMS_GUEST_ISSUER_ID : ${{ secrets.WEBEX_TEAMS_GUEST_ISSUER_ID }}
38+ WEBEX_TEAMS_GUEST_ISSUER_SECRET : ${{ secrets.WEBEX_TEAMS_GUEST_ISSUER_SECRET }}
39+ - name : Upload Distribution Files
40+ uses : actions/upload-artifact@v4
41+ with :
42+ name : distribution-files
43+ path : dist/
Original file line number Diff line number Diff line change @@ -3,35 +3,27 @@ name: Release
33on :
44 push :
55 tags :
6- - " v*.*"
7- - " v*.*.*"
6+ - " v*"
87
98jobs :
9+ build-and-test :
10+ name : Build and Test
11+ uses : ./.github/workflows/build-and-test.yml
12+ secrets : inherit
13+
1014 pypi :
11- name : Release to PyPI
15+ needs : build-and-test
16+ name : Publish to PyPI
1217 runs-on : ubuntu-latest
13- environment : pypi.org
18+ environment : test. pypi.org
1419 permissions :
1520 id-token : write
1621 steps :
17- - uses : actions/checkout@v4
18- - name : Install Dependencies
19- run : pip install -r requirements.txt
20- - name : Get Webex Token
21- id : webex_token
22- run : |
23- WEBEX_TEAMS_ACCESS_TOKEN=$(curl -s ${{ secrets.WEBEX_TOKEN_KEEPER_URL }} | jq -r .access_token)
24- echo "WEBEX_TEAMS_ACCESS_TOKEN=$WEBEX_TEAMS_ACCESS_TOKEN" >> "$GITHUB_OUTPUT"
25- echo "::add-mask::$WEBEX_TEAMS_ACCESS_TOKEN"
26- - name : Build and Test
27- run : script/ci
28- env :
29- WEBEX_TEAMS_ACCESS_TOKEN : ${{ steps.webex_token.outputs.WEBEX_TEAMS_ACCESS_TOKEN }}
30- WEBEX_TEAMS_TEST_DOMAIN : ${{ vars.WEBEX_TEAMS_TEST_DOMAIN }}
31- WEBEX_TEAMS_TEST_ID_START : ${{ vars.WEBEX_TEAMS_TEST_ID_START }}
32- WEBEX_TEAMS_TEST_FILE_URL : ${{ vars.WEBEX_TEAMS_TEST_FILE_URL }}
33- WEBEX_TEAMS_GUEST_ISSUER_ID : ${{ secrets.WEBEX_TEAMS_GUEST_ISSUER_ID }}
34- WEBEX_TEAMS_GUEST_ISSUER_SECRET : ${{ secrets.WEBEX_TEAMS_GUEST_ISSUER_SECRET }}
22+ - name : Download Distribution Files
23+ uses : actions/download-artifact@v4
24+ with :
25+ name : distribution-files
26+ path : dist/
3527 - name : Publish to PyPI
3628 uses : pypa/gh-action-pypi-publish@release/v1
3729 with :
You can’t perform that action at this time.
0 commit comments