Compare commits

..

1 Commits

Author SHA1 Message Date
codecov-releaser
9f60a44969 chore(release): wrapper-0.0.24 2024-11-15 12:52:41 +00:00
5 changed files with 16 additions and 32 deletions

View File

@@ -1,5 +1,5 @@
deploy: deploy:
$(eval VERSION := $(shell cat src/version | grep 'CODECOV_ACTION_VERSION=' | cut -d\" -f2)) $(eval VERSION := $(shell cat src/version | grep 'CODECOV_ACTION_VERSION=' | cut -d\" -f2))
git tag -d v5 git tag -d v5
git push origin :v5 git push origin :v5
git tag v5 git tag v5

1
VERSION Normal file
View File

@@ -0,0 +1 @@
5.0.0-beta

View File

@@ -166,61 +166,41 @@ runs:
if [ ${{ inputs.use_oidc }} == 'true' ]; if [ ${{ inputs.use_oidc }} == 'true' ];
then then
# {"count":1984,"value":"***"} # {"count":1984,"value":"***"}
CC_TOKEN=$(curl -H "Authorization: bearer $ACTIONS_ID_TOKEN_REQUEST_TOKEN" "$ACTIONS_ID_TOKEN_REQUEST_URL&audience=api://AzureADTokenExchange" | cut -d\' -f6) CODECOV_TOKEN=$(curl -H "Authorization: bearer $ACTIONS_ID_TOKEN_REQUEST_TOKEN" "$ACTIONS_ID_TOKEN_REQUEST_URL&audience=api://AzureADTokenExchange" | cut -d\' -f6)
echo "CC_TOKEN=$CC_TOKEN" >> "$GITHUB_ENV" echo "CODECOV_TOKEN=$CODECOV_TOKEN" >> $GITHUB_ENV
else else
if [ -n ${{ inputs.token }} ]; if [ -n ${{ inputs.token }} ];
then then
CC_TOKEN=${{ inputs.token }} CODECOV_TOKEN=${{ inputs.token }}
echo "CC_TOKEN=$CC_TOKEN" >> "$GITHUB_ENV" echo "CODECOV_TOKEN=$CODECOV_TOKEN" >> $GITHUB_ENV
fi fi
fi fi
- name: Override branch for forks - name: Override branch for forks
shell: bash shell: bash
run: | run: |
if [ -z "$CC_BRANCH" ] && [ -z "$CC_TOKEN" ] && [ "${GITHUB_EVENT_PULL_REQUEST_REPO_FULL_NAME}" != "$GITHUB_REPOSITORY" ]; if [ -z "$CC_BRANCH" ] && [ -z "$CODECOV_TOKEN" ] && [ "${GITHUB_EVENT_PULL_REQUEST_REPO_FULL_NAME}" != "$GITHUB_REPOSITORY" ];
then then
echo -e "\033[0;32m==>\033[0m Fork detected, tokenless uploading used" echo -e "\033[0;32m==>\033[0m Fork detected, tokenless uploading used"
TOKENLESS="$GITHUB_EVENT_PULL_REQUEST_HEAD_LABEL" TOKENLESS="$GITHUB_EVENT_PULL_REQUEST_HEAD_LABEL"
CC_BRANCH="$GITHUB_EVENT_PULL_REQUEST_HEAD_LABEL" CC_BRANCH="$GITHUB_EVENT_PULL_REQUEST_HEAD_LABEL"
echo "TOKENLESS=$TOKENLESS" >> "$GITHUB_ENV" echo "TOKENLESS=$TOKENLESS" >> $GITHUB_ENV
fi fi
echo "CC_BRANCH=$CC_BRANCH" >> "$GITHUB_ENV" echo "CC_BRANCH=$CC_BRANCH" >> $GITHUB_ENV
env: env:
CC_BRANCH: ${{ inputs.override_branch }} CC_BRANCH: ${{ inputs.override_branch }}
GITHUB_EVENT_PULL_REQUEST_HEAD_LABEL: ${{ github.event.pull_request.head.label }} GITHUB_EVENT_PULL_REQUEST_HEAD_LABEL: ${{ github.event.pull_request.head.label }}
GITHUB_EVENT_PULL_REQUEST_REPO_FULL_NAME: ${{ github.event.pull_request.repo.full_name }} GITHUB_EVENT_PULL_REQUEST_REPO_FULL_NAME: ${{ github.event.pull_request.repo.full_name }}
GITHUB_REPOSITORY: ${{ github.repository }} GITHUB_REPOSITORY: ${{ github.repository }}
- name: Override commits and pr for pull requests
shell: bash
run: |
if [ -z "$CC_SHA" ];
then
CC_SHA="$GITHUB_EVENT_PULL_REQUEST_HEAD_SHA"
fi
if [ -z "$CC_PR" ] && [ "${GITHUB_EVENT_NAME}" == "pull_request_target" ];
then
CC_PR="$GITHUB_EVENT_NUMBER"
fi
echo "CC_SHA=$CC_SHA" >> "$GITHUB_ENV"
echo "CC_PR=$CC_PR" >> "$GITHUB_ENV"
env:
CC_PR: ${{ inputs.override_pr }}
CC_SHA: ${{ inputs.override_commit }}
GITHUB_EVENT_NAME: ${{ github.event_name }}
GITHUB_EVENT_NUMBER: ${{ github.event.number }}
GITHUB_EVENT_PULL_REQUEST_HEAD_SHA: ${{ github.event.pull_request.head.sha }}
- name: Upload coverage to Codecov - name: Upload coverage to Codecov
run: ${GITHUB_ACTION_PATH}/dist/codecov.sh run: ${GITHUB_ACTION_PATH}/dist/codecov.sh
shell: bash shell: bash
working-directory: ${{ inputs.working-directory }} working-directory: ${{ inputs.working-directory }}
env: env:
CC_BINARY: ${{ inputs.binary }} CC_BINARY: ${{ inputs.binary }}
CC_BRANCH: $CC_BRANCH
CC_BUILD: ${{ inputs.override_build }} CC_BUILD: ${{ inputs.override_build }}
CC_BUILD_URL: ${{ inputs.override_build_url }} CC_BUILD_URL: ${{ inputs.override_build_url }}
CC_CODE: ${{ inputs.report_code }} CC_CODE: ${{ inputs.report_code }}
@@ -249,10 +229,13 @@ runs:
CC_OS: ${{ inputs.os }} CC_OS: ${{ inputs.os }}
CC_PARENT_SHA: ${{ inputs.commit_parent }} CC_PARENT_SHA: ${{ inputs.commit_parent }}
CC_PLUGINS: ${{ inputs.plugins }} CC_PLUGINS: ${{ inputs.plugins }}
CC_PR: ${{ inputs.override_pr }}
CC_REPORT_TYPE: ${{ inputs.report_type }} CC_REPORT_TYPE: ${{ inputs.report_type }}
CC_SHA: ${{ inputs.override_commit }}
CC_SKIP_VALIDATION: ${{ inputs.skip_validation }} CC_SKIP_VALIDATION: ${{ inputs.skip_validation }}
CC_SLUG: ${{ inputs.slug }} CC_SLUG: ${{ inputs.slug }}
CC_SWIFT_PROJECT: ${{ inputs.swift_project }} CC_SWIFT_PROJECT: ${{ inputs.swift_project }}
CC_TOKEN: $CODECOV_TOKEN
CC_VERBOSE: ${{ inputs.verbose }} CC_VERBOSE: ${{ inputs.verbose }}
CC_VERSION: ${{ inputs.version }} CC_VERSION: ${{ inputs.version }}
CC_YML_PATH: ${{ inputs.codecov_yml_path }} CC_YML_PATH: ${{ inputs.codecov_yml_path }}

4
dist/codecov.sh vendored
View File

@@ -1,5 +1,5 @@
#!/usr/bin/env bash #!/usr/bin/env bash
CC_WRAPPER_VERSION="0.0.24" CC_WRAPPER_VERSION="0.0.23"
set +u set +u
say() { say() {
echo -e "$1" echo -e "$1"
@@ -134,7 +134,6 @@ cc_cr_args+=( $(write_existing_args CC_PR) )
cc_cr_args+=( $(write_existing_args CC_SHA) ) cc_cr_args+=( $(write_existing_args CC_SHA) )
cc_cr_args+=( $(write_existing_args CC_SLUG) ) cc_cr_args+=( $(write_existing_args CC_SLUG) )
cc_du_args=() cc_du_args=()
cc_du_args+=( $(write_existing_args CC_ENV) )
OLDIFS=$IFS;IFS=, OLDIFS=$IFS;IFS=,
cc_du_args+=( $(write_existing_args CC_BRANCH) ) cc_du_args+=( $(write_existing_args CC_BRANCH) )
cc_du_args+=( $(write_existing_args CC_BUILD) ) cc_du_args+=( $(write_existing_args CC_BUILD) )
@@ -144,6 +143,7 @@ cc_du_args+=( $(write_existing_args CC_DIR) )
cc_du_args+=( $(write_truthy_args CC_DISABLE_FILE_FIXES) ) cc_du_args+=( $(write_truthy_args CC_DISABLE_FILE_FIXES) )
cc_du_args+=( $(write_truthy_args CC_DISABLE_SEARCH) ) cc_du_args+=( $(write_truthy_args CC_DISABLE_SEARCH) )
cc_du_args+=( $(write_truthy_args CC_DRY_RUN) ) cc_du_args+=( $(write_truthy_args CC_DRY_RUN) )
cc_du_args+=( $(write_existing_args CC_ENV) )
if [ -n "$CC_EXCLUDES" ]; if [ -n "$CC_EXCLUDES" ];
then then
for directory in $CC_EXCLUDES; do for directory in $CC_EXCLUDES; do

View File

@@ -1 +1 @@
CODECOV_ACTION_VERSION="5.0.2" CODECOV_ACTION_VERSION="5.0.0"