Skip to content

Commit 3c1559d

Browse files
fix: bring back pre-Sentry release process workflows (#725)
* fix: bring back pre-Sentry release process workflows * chore: Add back comment
1 parent 70d79d5 commit 3c1559d

10 files changed

Lines changed: 292 additions & 212 deletions

‎.craft.yml‎

Lines changed: 0 additions & 15 deletions
This file was deleted.

‎.github/workflows/broadcast_api_changes.yml‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ jobs:
1616
issues: write
1717
steps:
1818
- name: Checkout
19-
uses: actions/checkout@v7
19+
uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0
2020

2121
- name: Install GitHub CLI
2222
uses: dev-hanz-ops/install-gh-cli-action@v0.1.0

‎.github/workflows/build.yml‎

Lines changed: 0 additions & 140 deletions
This file was deleted.

‎.github/workflows/build_assets.yml‎

Lines changed: 129 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,129 @@
1+
name: Build Compiled Assets
2+
3+
on:
4+
workflow_call:
5+
inputs:
6+
release:
7+
type: boolean
8+
default: false
9+
description: "Attach artifacts to a release"
10+
11+
permissions:
12+
contents: read
13+
14+
jobs:
15+
build_assets:
16+
name: Build packages - ${{ matrix.os }}
17+
runs-on: ${{ matrix.os }}
18+
permissions:
19+
contents: write # needed for svenstaro/upload-release-action when inputs.release == true
20+
strategy:
21+
fail-fast: true
22+
matrix:
23+
include:
24+
- os: macos-latest
25+
TARGET: macos
26+
CMD_BUILD: >
27+
uv run pyinstaller --target-arch universal2 -F codecov_cli/main.py &&
28+
mv dist/main dist/codecovcli_macos &&
29+
lipo -archs dist/codecovcli_macos | grep 'x86_64 arm64'
30+
OUT_FILE_NAME: codecovcli_macos
31+
32+
- os: ubuntu-22.04
33+
TARGET: ubuntu
34+
CMD_BUILD: >
35+
uv run pyinstaller -F codecov_cli/main.py &&
36+
cp ./dist/main ./dist/codecovcli_linux
37+
OUT_FILE_NAME: codecovcli_linux
38+
39+
- os: windows-latest
40+
TARGET: windows
41+
CMD_BUILD: >
42+
uv run pyinstaller -F .\codecov_cli\main.py &&
43+
Copy-Item -Path ".\dist\main.exe" -Destination ".\dist\codecovcli_windows.exe"
44+
OUT_FILE_NAME: codecovcli_windows.exe
45+
46+
steps:
47+
- uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0
48+
49+
- name: Set up Python 3.11
50+
uses: actions/setup-python@a26af69be951a213d495a4c3e4e4022e16d87065 # v5.6.0
51+
with:
52+
python-version: "3.11"
53+
54+
- name: Install uv and dependencies
55+
run: |
56+
pip install uv
57+
# Need to build pyyaml and ijson from sdists to get universal2 macos build to work
58+
uv sync --no-binary-package pyyaml --no-binary-package ijson
59+
60+
- name: Build with pyinstaller for ${{ matrix.TARGET }}
61+
run: ${{ matrix.CMD_BUILD }}
62+
63+
- name: Upload a Build Artifact
64+
if: inputs.release == false
65+
uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4.6.2
66+
with:
67+
name: ${{ matrix.OUT_FILE_NAME }}
68+
path: ./dist/${{ matrix.OUT_FILE_NAME }}
69+
70+
- name: Upload Release Asset
71+
if: inputs.release == true
72+
uses: svenstaro/upload-release-action@81c65b7cd4de9b2570615ce3aad67a41de5b1a13 # v2.11.2
73+
with:
74+
repo_token: ${{ secrets.GITHUB_TOKEN }}
75+
file: ./dist/${{ matrix.OUT_FILE_NAME }}
76+
asset_name: ${{ matrix.OUT_FILE_NAME }}
77+
tag: ${{ github.ref }}
78+
overwrite: true
79+
80+
build_assets_alpine_arm:
81+
name: Build assets - Alpine and ARM
82+
runs-on: ${{ matrix.runs-on }}
83+
permissions:
84+
contents: write # needed for svenstaro/upload-release-action when inputs.release == true
85+
strategy:
86+
matrix:
87+
include:
88+
- distro: "alpine:3.14"
89+
arch: arm64
90+
distro_name: alpine
91+
runs-on: ubuntu-24.04-arm
92+
- distro: "alpine:3.14"
93+
arch: x86_64
94+
distro_name: alpine
95+
runs-on: ubuntu-24.04
96+
- distro: "ubuntu:20.04"
97+
arch: arm64
98+
distro_name: linux
99+
runs-on: ubuntu-24.04-arm
100+
101+
steps:
102+
- uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0
103+
104+
- name: Run in Docker
105+
run: |
106+
docker run \
107+
--rm \
108+
-v $(pwd):/${{ github.workspace }} \
109+
-w ${{ github.workspace }} \
110+
--platform linux/${{ matrix.arch }} \
111+
${{ matrix.distro }} \
112+
./scripts/build_${{ matrix.distro_name }}.sh ${{ matrix.distro_name }}_${{ matrix.arch }}
113+
114+
- name: Upload a Build Artifact
115+
if: inputs.release == false
116+
uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4.6.2
117+
with:
118+
name: codecovcli_${{ matrix.distro_name }}_${{ matrix.arch }}
119+
path: ./dist/codecovcli_${{ matrix.distro_name }}_${{ matrix.arch }}
120+
121+
- name: Upload Release Asset
122+
if: inputs.release == true
123+
uses: svenstaro/upload-release-action@81c65b7cd4de9b2570615ce3aad67a41de5b1a13 # v2.11.2
124+
with:
125+
repo_token: ${{ secrets.GITHUB_TOKEN }}
126+
file: ./dist/codecovcli_${{ matrix.distro_name }}_${{ matrix.arch }}
127+
asset_name: codecovcli_${{ matrix.distro_name }}_${{ matrix.arch }}
128+
tag: ${{ github.ref }}
129+
overwrite: true
Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
---
2+
name: Build for PyPi
3+
4+
on:
5+
workflow_call:
6+
7+
permissions:
8+
contents: read
9+
10+
jobs:
11+
build_for_pypi:
12+
runs-on: ubuntu-latest
13+
steps:
14+
- uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0
15+
with:
16+
persist-credentials: false
17+
18+
- name: Install uv
19+
run: pip install uv
20+
21+
- name: Build sdist and wheel
22+
run: uv build
23+
24+
- name: Store the distribution packages
25+
uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4.6.2
26+
with:
27+
name: cibw-codecov-cli
28+
path: ./dist/*

‎.github/workflows/ci.yml‎

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ jobs:
1818
lint:
1919
runs-on: ubuntu-latest
2020
steps:
21-
- uses: actions/checkout@v7
21+
- uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0
2222

2323
- name: Check linting with ruff
2424
run: |
@@ -27,7 +27,7 @@ jobs:
2727
detect-command-change:
2828
runs-on: ubuntu-latest
2929
steps:
30-
- uses: actions/checkout@v7
30+
- uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0
3131

3232
- name: Set up Python 3.13
3333
uses: actions/setup-python@v5
@@ -55,7 +55,7 @@ jobs:
5555
runs-on: ubuntu-latest
5656
if: ${{ !github.event.pull_request.head.repo.fork && github.repository_owner == 'codecov' }}
5757
steps:
58-
- uses: actions/checkout@v7
58+
- uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0
5959
with:
6060
fetch-depth: 2
6161

@@ -84,7 +84,7 @@ jobs:
8484
python-version: ["3.13", "3.12", "3.11", "3.10", "3.9"]
8585
runs-on: ${{matrix.os}}
8686
steps:
87-
- uses: actions/checkout@v7
87+
- uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0
8888
with:
8989
fetch-depth: 2
9090

‎.github/workflows/create-release.yml‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ jobs:
1313
runs-on: ubuntu-latest
1414
steps:
1515
- name: Checkout
16-
uses: actions/checkout@v7
16+
uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0
1717
with:
1818
fetch-depth: 0
1919
fetch-tags: true

0 commit comments

Comments
 (0)