Skip to content
2 changes: 1 addition & 1 deletion .craft.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,6 @@ targets:
tagPrefix: v
checksums:
- algorithm: sha256
includeNames: /^sentry-prevent-cli_.*/i
includeNames: /^(sentry-prevent-|sentry_prevent_|codecov|codecov_)cli.*/i

# - name: pypi
13 changes: 10 additions & 3 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -94,6 +94,9 @@ jobs:
cd ../codecov-cli
uv sync --no-binary-package pyyaml --no-binary-package ijson

- name: Run pre-build script
run: ./scripts/pre-build.sh

- name: Build with pyinstaller for ${{matrix.TARGET}}
run: ${{matrix.CMD_BUILD}}

Expand Down Expand Up @@ -158,18 +161,22 @@ jobs:
path: ./prevent-cli/dist/sentry-prevent-cli_*

package_artifacts:
# Craft requires one artifact named after the long commit sha of the release
# Craft requires one artifact named after the long commit sha of the release.
name: Package assets for Craft
runs-on: ubuntu-latest
needs: [build_for_pypi, build_assets, build_linux_assets]
steps:
- name: Download artifacts
uses: actions/download-artifact@d3f86a106a0bac45b974a628896c90dbdf5c8093 # v4.3.0
with:
pattern: sentry-prevent-cli_*
pattern: "{sentry-prevent-,codecov-,codecov}cli*"

- name: Upload release artifact
uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4.6.2
with:
name: ${{ github.sha }}
path: sentry-prevent-cli_*
path: |
sentry-prevent-cli*
sentry-prevent-cli_wheel/*
codecovcli*
codecov-cli_wheel/*
39 changes: 7 additions & 32 deletions .github/workflows/release-codecov-cli.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# This workflow publishes the codecov-cli assets to PyPI, GitHub releases, and
# our GCS bucket when a release is created.
# This workflow publishes the codecov-cli assets to PyPI and our GCS bucket
# when a release is created.
name: Build and publish codecov-cli

on:
Expand All @@ -10,8 +10,12 @@ permissions:
contents: read

jobs:
test:
runs-on: ubuntu-latest
steps:
- run: echo "hi from build and publish codecov-cli"
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

hmmm

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lolol this is so the workflow doesn't break


# publish_to_pypi:
# needs: build_for_pypi
# permissions:
# id-token: write # This is required for OIDC
# runs-on: ubuntu-latest
Expand All @@ -32,37 +36,8 @@ jobs:
# verbose: true
# packages-dir: codecov-cli/dist

publish_to_github:
runs-on: ubuntu-latest
steps:
- name: Download build artifacts
uses: dawidd6/action-download-artifact@ac66b43f0e6a346234dd65d4d0c8fbb31cb316e5 # v11
with:
branch: release/${{ github.ref }}
name: codecov.*
name_is_regexp: true
path: codecov-cli/dist

- name: Get auth token
id: token
uses: actions/create-github-app-token@df432ceedc7162793a195dd1713ff69aefc7379e # v2.0.6
with:
app-id: ${{ vars.SENTRY_RELEASE_BOT_CLIENT_ID }}
private-key: ${{ secrets.SENTRY_RELEASE_BOT_PRIVATE_KEY }}

- name: Upload Release Asset
id: upload-release-asset
uses: svenstaro/upload-release-action@81c65b7cd4de9b2570615ce3aad67a41de5b1a13 # v2.11.2
with:
repo_token: ${{ steps.token.outputs.token }}
file_glob: true
file: ./codecov-cli/dist/*
tag: ${{ github.ref }}
overwrite: true

# publish_release:
# name: Publish release
# needs: [build_assets, build_linux_assets, build_for_pypi, publish_to_pypi]
# runs-on: ubuntu-latest
# permissions:
# contents: "read"
Expand Down
1 change: 1 addition & 0 deletions scripts/build_alpine.sh
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ if sha256sum -c ./scripts/uv-installer-0.7.8.sha256sum; then
sh uv-installer.sh; else
echo "uv-installer failed checksum" && exit 1
fi
./scripts/pre-build.sh
cd prevent-cli
/root/.local/bin/uv python pin 3.9 # we need to build with python 3.9 to support systems with libpython >= 3.9
/root/.local/bin/uv sync
Expand Down
1 change: 1 addition & 0 deletions scripts/build_linux.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ set -eux
apt update
DEBIAN_FRONTEND=noninteractive apt install -y tzdata
apt install -y python3.9 python3.9-dev python3-pip
./scripts/pre-build.sh
cd prevent-cli
python3.9 -m pip install uv --only-binary uv
uv python pin 3.9 # we need to build with python 3.9 to support systems with libpython >= 3.9
Expand Down
8 changes: 8 additions & 0 deletions scripts/pre-build.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
#!/bin/sh
# this updates the editable property on the codecov-cli import in prevent-cli
# to be false. This is necessary for the pyinstaller build to work.
if [[ "$OSTYPE" == "darwin"* ]]; then
sed -i '' "s/editable\ =\ true/editable\ =\ false/g" prevent-cli/pyproject.toml
else
sed -i "s/editable\ =\ true/editable\ =\ false/g" prevent-cli/pyproject.toml
fi
Loading