diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index de565da..6b68649 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -24,7 +24,7 @@ jobs: php-version: '8.0' - name: Checkout Source - uses: actions/checkout@v2 + uses: actions/checkout@v3 with: fetch-depth: 0 submodules: recursive @@ -32,12 +32,14 @@ jobs: - name: Prepare Package Script # Update the version in code and generate the package. run: | - ls .git - dev-scripts/update_version.sh - python3 dev-scripts/prepare_pecl_release.py --name aws-crt --user aws-crt --email aws-sdk-common-runtime@amazon.com --version ${{ steps.tag.outputs.release_tag }} + version_with_v=$(git describe --tags --abbrev=0) + VERSION=$(echo ${version_with_v} | cut -f2 -dv) + sed -i "s/#define CRT_VERSION .*/#define CRT_VERSION \"$VERSION\"/g" ext/crt.c + export VERSION="${VERSION}" + python3 dev-scripts/prepare_pecl_release.py --name aws-crt --user aws-crt --email aws-sdk-common-runtime@amazon.com --version ${VERSION} - name: Upload artifacts uses: actions/upload-artifact@v3 with: - name: pecl_package_${{ steps.tag.outputs.release_tag }} - path: awscrt-${{ steps.tag.outputs.release_tag }}.tgz \ No newline at end of file + name: pecl_package_${VERSION} + path: awscrt-${VERSION} \ No newline at end of file