Skip to content

Commit

Permalink
[GitHub Actions] Use FetchSentryCLI.cmake
Browse files Browse the repository at this point in the history
  • Loading branch information
past-due committed Jun 11, 2024
1 parent 6ed152b commit 56c9cad
Show file tree
Hide file tree
Showing 5 changed files with 66 additions and 15 deletions.
16 changes: 14 additions & 2 deletions .github/workflows/CI_flatpak.yml
Original file line number Diff line number Diff line change
Expand Up @@ -315,10 +315,15 @@ jobs:
# For this job to work, the following secrets must be set in the 'upload_symbols' environment:
# SENTRY_AUTH_TOKEN
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 1
path: 'src'
- name: Prep Environment
run: |
mkdir -p dl-debug/symbols
mkdir -p dl-debug/additional
echo "WZ_REPO_PATH=$(pwd)/src" >> $GITHUB_ENV
- name: Download Debug Symbols
uses: actions/download-artifact@v4
with:
Expand All @@ -343,8 +348,15 @@ jobs:
echo "No SENTRY_AUTH_TOKEN - skipping"
exit 0
fi
docker pull getsentry/sentry-cli
docker run --rm -e SENTRY_AUTH_TOKEN -v "$(pwd):/work" getsentry/sentry-cli debug-files upload --no-zips -o warzone2100 -p warzone2100 "${WZ_ARCHIVE_DIR}"
# Download sentry-cli
echo "::group::Downloading sentry-cli ..."
cmake -P "${WZ_REPO_PATH}/.ci/githubactions/FetchSentryCLI.cmake"
echo "Downloading sentry-cli ... Done"
echo "::endgroup::"
# Upload symbols
echo "::group::sentry-cli debug-files upload"
./sentry-cli/sentry-cli debug-files upload --no-zips -o warzone2100 -p warzone2100 "${WZ_ARCHIVE_DIR}"
echo "::endgroup::"
upload-release-builds:
strategy:
Expand Down
16 changes: 14 additions & 2 deletions .github/workflows/CI_macos.yml
Original file line number Diff line number Diff line change
Expand Up @@ -393,9 +393,14 @@ jobs:
# For this job to work, the following secrets must be set in the 'upload_symbols' environment:
# SENTRY_AUTH_TOKEN
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 1
path: 'src'
- name: Prep Environment
run: |
mkdir dl-archive
echo "WZ_REPO_PATH=$(pwd)/src" >> $GITHUB_ENV
- name: Download Artifacts
uses: actions/download-artifact@v4
with:
Expand All @@ -417,5 +422,12 @@ jobs:
echo "No SENTRY_AUTH_TOKEN - skipping"
exit 0
fi
docker pull getsentry/sentry-cli
docker run --rm -e SENTRY_AUTH_TOKEN -v "$(pwd):/work" getsentry/sentry-cli upload-dif --no-zips -o warzone2100 -p warzone2100 "${WZ_ARCHIVE_DIR}"
# Download sentry-cli
echo "::group::Downloading sentry-cli ..."
cmake -P "${WZ_REPO_PATH}/.ci/githubactions/FetchSentryCLI.cmake"
echo "Downloading sentry-cli ... Done"
echo "::endgroup::"
# Upload symbols
echo "::group::sentry-cli debug-files upload"
./sentry-cli/sentry-cli debug-files upload --no-zips -o warzone2100 -p warzone2100 "${WZ_ARCHIVE_DIR}"
echo "::endgroup::"
16 changes: 14 additions & 2 deletions .github/workflows/CI_ubuntu.yml
Original file line number Diff line number Diff line change
Expand Up @@ -328,9 +328,14 @@ jobs:
# For this job to work, the following secrets must be set in the 'upload_symbols' environment:
# SENTRY_AUTH_TOKEN
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 1
path: 'src'
- name: Prep Environment
run: |
mkdir dl-debug-symbols
echo "WZ_REPO_PATH=$(pwd)/src" >> $GITHUB_ENV
- name: Download Artifacts
uses: actions/download-artifact@v4
with:
Expand All @@ -350,5 +355,12 @@ jobs:
echo "No SENTRY_AUTH_TOKEN - skipping"
exit 0
fi
docker pull getsentry/sentry-cli
docker run --rm -e SENTRY_AUTH_TOKEN -v "$(pwd):/work" getsentry/sentry-cli upload-dif --no-zips -o warzone2100 -p warzone2100 "${WZ_ARCHIVE_DIR}"
# Download sentry-cli
echo "::group::Downloading sentry-cli ..."
cmake -P "${WZ_REPO_PATH}/.ci/githubactions/FetchSentryCLI.cmake"
echo "Downloading sentry-cli ... Done"
echo "::endgroup::"
# Upload symbols
echo "::group::sentry-cli debug-files upload"
./sentry-cli/sentry-cli debug-files upload --no-zips -o warzone2100 -p warzone2100 "${WZ_ARCHIVE_DIR}"
echo "::endgroup::"
20 changes: 15 additions & 5 deletions .github/workflows/CI_windows.yml
Original file line number Diff line number Diff line change
Expand Up @@ -794,6 +794,10 @@ jobs:
# For this job to work, the following secrets must be set in the 'upload_symbols' environment:
# SENTRY_AUTH_TOKEN
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 1
path: 'src'
- name: Prep Environment
id: settings
run: |
Expand All @@ -802,6 +806,7 @@ jobs:
OUTPUTDIR="wz-${WZ_TARGET_ARCH}"
echo "OUTPUTDIR=${OUTPUTDIR}" >> $GITHUB_ENV
echo "ARCHIVEDIR=${OUTPUTDIR}" >> $GITHUB_OUTPUT
echo "WZ_REPO_PATH=$(pwd)/src" >> $GITHUB_ENV
- name: Download Archive Artifact
uses: actions/download-artifact@v4
with:
Expand Down Expand Up @@ -846,11 +851,16 @@ jobs:
echo "No SENTRY_AUTH_TOKEN - skipping"
exit 0
fi
docker pull getsentry/sentry-cli
echo "Uploading debug symbols"
docker run --rm -e SENTRY_AUTH_TOKEN -v "$(pwd):/work" getsentry/sentry-cli upload-dif --no-zips -o warzone2100 -p warzone2100 "${WZ_ARCHIVE_DIR}"
echo "Uploading source bundles"
docker run --rm -e SENTRY_AUTH_TOKEN -v "$(pwd):/work" getsentry/sentry-cli upload-dif --type sourcebundle -o warzone2100 -p warzone2100 "${WZ_SOURCEBUNDLES_DIR}"
# Download sentry-cli
echo "::group::Downloading sentry-cli ..."
cmake -P "${WZ_REPO_PATH}/.ci/githubactions/FetchSentryCLI.cmake"
echo "Downloading sentry-cli ... Done"
echo "::endgroup::"
# Upload symbols
echo "::group::sentry-cli debug-files upload"
./sentry-cli/sentry-cli debug-files upload --no-zips -o warzone2100 -p warzone2100 "${WZ_ARCHIVE_DIR}"
./sentry-cli/sentry-cli debug-files upload --type sourcebundle -o warzone2100 -p warzone2100 "${WZ_SOURCEBUNDLES_DIR}"
echo "::endgroup::"
trigger-updates-json:
name: 'Trigger Info Update'
permissions:
Expand Down
13 changes: 9 additions & 4 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -123,6 +123,7 @@ jobs:
CURRENT_TAG_COMMIT="$(git rev-list -n 1 "${GITHUB_REF}")"
echo "CURRENT_TAG_COMMIT=${CURRENT_TAG_COMMIT}"
echo "WZ_REPO_PATH=$(pwd)" >> $GITHUB_ENV
echo "SENTRY_VERSION=${SENTRY_VERSION}" >> $GITHUB_ENV
echo "PRIOR_TAG_COMMIT=${PRIOR_TAG_COMMIT}" >> $GITHUB_ENV
echo "CURRENT_TAG_COMMIT=${CURRENT_TAG_COMMIT}" >> $GITHUB_ENV
Expand All @@ -141,14 +142,18 @@ jobs:
echo "No SENTRY_VERSION - skipping"
exit 0
fi
docker pull getsentry/sentry-cli
# Download sentry-cli
echo "::group::Downloading sentry-cli ..."
cmake -P "${WZ_REPO_PATH}/.ci/githubactions/FetchSentryCLI.cmake"
echo "Downloading sentry-cli ... Done"
echo "::endgroup::"
# Check if release already exists
echo "Checking if release exists: ${SENTRY_VERSION}"
if ! docker run --rm -e SENTRY_AUTH_TOKEN -e SENTRY_ORG -v "$(pwd):/work" getsentry/sentry-cli releases info "${SENTRY_VERSION}" -q; then
if ! ./sentry-cli/sentry-cli releases info "${SENTRY_VERSION}" -q; then
# Create the release
echo "Creating the release: ${SENTRY_VERSION}"
docker run --rm -e SENTRY_AUTH_TOKEN -e SENTRY_ORG -v "$(pwd):/work" getsentry/sentry-cli releases new -p warzone2100 "${SENTRY_VERSION}" || echo "Failed to create the release?"
./sentry-cli/sentry-cli releases new -p warzone2100 "${SENTRY_VERSION}" || echo "Failed to create the release?"
fi
# Associate commits with the release
echo "Associate commits with the release: ${SENTRY_VERSION}"
docker run --rm -e SENTRY_AUTH_TOKEN -e SENTRY_ORG -v "$(pwd):/work" getsentry/sentry-cli releases set-commits "${SENTRY_VERSION}" --commit "Warzone2100/warzone2100@${PRIOR_TAG_COMMIT}..${CURRENT_TAG_COMMIT}"
./sentry-cli/sentry-cli releases set-commits "${SENTRY_VERSION}" --commit "Warzone2100/warzone2100@${PRIOR_TAG_COMMIT}..${CURRENT_TAG_COMMIT}"

0 comments on commit 56c9cad

Please sign in to comment.