3131 lipo -archs dist/codecovcli_macos | grep 'x86_64 arm64'
3232 OUT_FILE_NAME : codecovcli_macos
3333 ASSET_MIME : application/octet-stream
34+
3435 - os : ubuntu-22.04
3536 TARGET : ubuntu
3637 CMD_REQS : >
4142 cp ./dist/main ./dist/codecovcli_linux
4243 OUT_FILE_NAME : codecovcli_linux
4344 ASSET_MIME : application/octet-stream
45+
4446 - os : windows-latest
4547 TARGET : windows
4648 CMD_REQS : >
@@ -50,35 +52,50 @@ jobs:
5052 Copy-Item -Path ".\dist\main.exe" -Destination ".\dist\codecovcli_windows.exe"
5153 OUT_FILE_NAME : codecovcli_windows.exe
5254 ASSET_MIME : application/vnd.microsoft.portable-executable
55+
5356 steps :
5457 - uses : actions/checkout@v4
5558 with :
5659 submodules : true
60+
5761 - name : Set up Python 3.11
5862 uses : actions/setup-python@v3
5963 with :
6064 python-version : " 3.11"
65+
6166 - name : Install dependencies
6267 run : |
6368 cd codecov-cli
6469 ${{matrix.CMD_REQS}}
6570 python setup.py build
71+
6672 - name : Install pyinstaller
6773 run : pip install pyinstaller
74+
6875 - name : Build with pyinstaller for ${{matrix.TARGET}}
6976 run : cd codecov-cli && ${{matrix.CMD_BUILD}}
77+
7078 - name : Upload a Build Artifact
7179 uses : actions/upload-artifact@v4
7280 if : inputs.release == false
7381 with :
7482 name : ${{ matrix.OUT_FILE_NAME }}
7583 path : ./codecov-cli/dist/${{ matrix.OUT_FILE_NAME }}
84+
85+ - name : Get auth token
86+ if : inputs.release == true
87+ id : token
88+ uses : actions/create-github-app-token@df432ceedc7162793a195dd1713ff69aefc7379e # v2.0.6
89+ with :
90+ app-id : ${{ vars.SENTRY_RELEASE_BOT_CLIENT_ID }}
91+ private-key : ${{ secrets.SENTRY_RELEASE_BOT_PRIVATE_KEY }}
92+
7693 - name : Upload Release Asset
7794 if : inputs.release == true
7895 id : upload-release-asset
7996 uses : svenstaro/upload-release-action@v2
8097 with :
81- repo_token : ${{ secrets.GITHUB_TOKEN }}
98+ repo_token : ${{ steps.token.outputs.token }}
8299 file : ./codecov-cli/dist/${{ matrix.OUT_FILE_NAME }}
83100 asset_name : ${{ matrix.OUT_FILE_NAME }}
84101 tag : ${{ github.ref }}
@@ -104,10 +121,12 @@ jobs:
104121 - uses : actions/checkout@v4
105122 with :
106123 submodules : true
124+
107125 - name : Set up QEMU
108126 uses : docker/setup-qemu-action@v1
109127 with :
110128 platforms : ${{ matrix.arch }}
129+
111130 - name : Run in Docker
112131 run : |
113132 docker run \
@@ -117,18 +136,28 @@ jobs:
117136 --platform linux/${{ matrix.arch }} \
118137 ${{ matrix.distro }} \
119138 ./codecov-cli/scripts/build_${{ matrix.distro_name }}_arm.sh ${{ matrix.distro_name }}_${{ matrix.arch }}
139+
120140 - name : Upload a Build Artifact
121141 uses : actions/upload-artifact@v4
122142 if : inputs.release == false
123143 with :
124144 name : codecovcli_${{ matrix.distro_name }}_${{ matrix.arch }}
125145 path : ./codecov-cli/dist/codecovcli_${{ matrix.distro_name }}_${{ matrix.arch }}
146+
147+ - name : Get auth token
148+ if : inputs.release == true
149+ id : token
150+ uses : actions/create-github-app-token@df432ceedc7162793a195dd1713ff69aefc7379e # v2.0.6
151+ with :
152+ app-id : ${{ vars.SENTRY_RELEASE_BOT_CLIENT_ID }}
153+ private-key : ${{ secrets.SENTRY_RELEASE_BOT_PRIVATE_KEY }}
154+
126155 - name : Upload Release Asset
127156 if : inputs.release == true
128157 id : upload-release-asset
129158 uses : svenstaro/upload-release-action@v2
130159 with :
131- repo_token : ${{ secrets.GITHUB_TOKEN }}
160+ repo_token : ${{ steps.token.outputs.token }}
132161 file : ./codecov-cli/dist/codecovcli_${{ matrix.distro_name }}_${{ matrix.arch }}
133162 asset_name : codecovcli_${{ matrix.distro_name }}_${{ matrix.arch }}
134163 tag : ${{ github.ref }}
0 commit comments