use github output

This commit is contained in:
Dengke Tang
2023-02-28 17:41:54 -08:00
parent 1cb0cf28ef
commit 8bf63c40b2
+4 -3
View File
@@ -30,16 +30,17 @@ jobs:
submodules: recursive submodules: recursive
- name: Prepare Package Script - name: Prepare Package Script
id: prepare-package
# Update the version in code and generate the package. # Update the version in code and generate the package.
run: | run: |
version_with_v=$(git describe --tags --abbrev=0) version_with_v=$(git describe --tags --abbrev=0)
VERSION=$(echo ${version_with_v} | cut -f2 -dv) VERSION=$(echo ${version_with_v} | cut -f2 -dv)
sed -i "s/#define CRT_VERSION .*/#define CRT_VERSION \"$VERSION\"/g" ext/crt.c sed -i "s/#define CRT_VERSION .*/#define CRT_VERSION \"$VERSION\"/g" ext/crt.c
export VERSION="${VERSION}" echo "VERSION="${VERSION}" >> $GITHUB_OUTPUT
python3 dev-scripts/prepare_pecl_release.py --name aws-crt --user aws-crt --email [email protected] --version ${VERSION} python3 dev-scripts/prepare_pecl_release.py --name aws-crt --user aws-crt --email [email protected] --version ${VERSION}
- name: Upload artifacts - name: Upload artifacts
uses: actions/upload-artifact@v3 uses: actions/upload-artifact@v3
with: with:
name: pecl_package_$VERSION name: pecl_package_${{ steps.prepare-package.outputs.VERSION }}
path: awscrt-$VERSION.tgz path: awscrt-${{ steps.prepare-package.outputs.VERSION }}.tgz